@dlghq/markdown
v2.16.7
Published
Markdown for dialog projects
Downloads
231
Readme
Markdown
Usage
import { parse, decorators } from '@dlghq/markdown';
console.log(parse('Hello, *world*!', decorators)); // AST
AST for above example would be
[
{
"type": "paragraph",
"content": [
{
"type": "text",
"content": "Hello, "
},
{
"type": "text",
"content": "world",
"highlight": "bold"
},
{
"type": "text",
"content": "!"
}
]
}
]