This plugin parses custom Markdown syntax to produce (HTML) abbreviations.
Syntax
An abbreviation works the same as footnotes:
This plugin works on MDAST, a Markdown AST
implemented by [remark](https://github.com/wooorm/remark)
*[HAST]: Markdown Abstract Syntax Tree.
*[AST]: Abstract syntax tree
produces:
<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/wooorm/remark">remark</a></p>
Installation
npm:
npm install remark-abbr
Usage
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)
License
MIT © Zeste de Savoir