This plugin parses custom Markdown syntax to produce HTML abbreviations.
An abbreviation works the same as footnotes:
This plugin works on HAST, an HTML AST
implemented by [rehype](https://github.com/wooorm/rehype)
*[HAST]: Hypertext Abstract Syntax Tree format.
*[AST]: Abstract syntax tree
produces:
<p>This plugin works on <abbr title="Hypertext Abstract Syntax Tree format.">HAST</abbr>, an HTML <abbr title="Abstract syntax tree">AST</abbr>
implemented by <a href="https://github.com/wooorm/rehype">rehype</a></p>
npm:
npm install rehype-abbr
Dependencies:
const unified = require('unified')
const remarkParse = require('remark-parse')
const stringify = require('rehype-stringify')
const remark2rehype = require('remark-rehype')
const rehypeAbbr = require('rehype-abbr')
Usage:
unified()
.use(remarkParse)
.use(remark2rehype)
.use(rehypeAbbr)
.use(stringify)