qnote-parser
v1.0.2
Published
Parser for Qiita note notation
Downloads
4
Maintainers
Readme
qnote-parser
Marked extension for parsing Qiita note notation.
Installation
npm install qnote-parser
Usage
import { marked } from "marked";
import { qnote } from "qnote-parser";
marked.use({ extensions: [qnote] });
const markdown = `Hello.
:::note info
This is **note** notation.
Paragraph is supported.
:::
Good-bye!`;
console.log(marked.parse(markdown));
result:
<p>Hello.</p>
<div class="note-info">
<div class="note-content">
<p>This is <strong>note</strong> notation.</p>
<p>Paragraph is supported.</p>
</div>
</div>
<p>Good-bye!</p>