render-markdown-it-tokens
v0.0.4
Published
Render `markdown-it` tokens back to Markdown
Readme
render-markdown-it-tokens
Render markdown-it tokens back to Markdown
Usage
npm install render-markdown-it-tokensimport { renderMarkdownItTokens } from 'render-markdown-it-tokens'
const tokens = [
{ type: 'heading_open', tag: 'h1', level: 1 },
{ type: 'inline', content: 'Hello, world!' },
{ type: 'heading_close', tag: 'h1', level: 1 },
]
const markdown = renderMarkdownItTokens(tokens)
console.log(markdown)
// # Hello, world!