1.0.2 • Published 2 years ago

qnote-parser v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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>