Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
remark-abbr
Advanced tools
This [remark][remark] plugin parses custom Markdown syntax to produce (HTML) abbreviations.
This remark plugin parses custom Markdown syntax to produce (HTML) abbreviations.
It introduces a new MDAST node type: "abbr".
interface abbr <: Node {
type: "abbr";
abbr: string;
reference: string;
data: {
hName: "abbr";
hProperties: {
title: string;
}
}
}
Abbreviations are defined a bit like footnotes:
This plugin works on MDAST, a Markdown AST
implemented by [remark](https://github.com/remarkjs/remark)
*[MDAST]: Markdown Abstract Syntax Tree.
*[AST]: Abstract syntax tree
This would compile to the following HTML:
<p>This plugin works on <abbr title="Markdown Abstract Syntax Tree.">MDAST</abbr>, a Markdown <abbr title="Abstract syntax tree">AST</abbr>
implemented by <a href="https://github.com/remarkjs/remark">remark</a></p>
npm:
npm install remark-abbr
Dependencies:
const unified = require('unified')
const remarkParse = require('remark-parse')
const remarkAbbr = require('remark-abbr')
const stringify = require('rehype-stringify')
const remark2rehype = require('remark-rehype')
Usage:
unified()
.use(remarkParse)
.use(remarkAbbr)
.use(remark2rehype)
.use(stringify)
Expand the first occurrence of each abbreviation in place to introduce the definition and it's definition. Further occurrences are parsed into "abbr" MDAST nodes as the plugin would normally do.
example
.use(remarkAbbr, { expandFirst: true })
given
This plugin works on MDAST.
More stuff about MDAST.
*[MDAST]: Markdown Abstract Syntax Tree
produces
<p>This plugin works on Markdown Abstract Syntax Tree (<abbr title="Markdown Abstract Syntax Tree">MDAST</abbr>).</p>
<p>More stuff about <abbr title="Markdown Abstract Syntax Tree">MDAST</abbr>.</p>"
FAQs
This [remark][remark] plugin parses custom Markdown syntax to produce (HTML) abbreviations.
The npm package remark-abbr receives a total of 693 weekly downloads. As such, remark-abbr popularity was classified as not popular.
We found that remark-abbr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.