2.0.0-alpha.2 • Published 2 years ago
@yozora/html-blockquote v2.0.0-alpha.2
This component is for rendering the Yozora Markdown AST node IBlockquote
produced by @yozora/tokenizer-blockquote into HTML string.
This component has been built into @yozora/html-markdown, you can use it directly.
Install
npm
npm install --save @yozora/html-blockquote
yarn
yarn add @yozora/html-blockquote
Usage
Basic:
import type { IBlockquote, IYastNode } from '@yozora/ast' import renderBlockquote from '@yozora/html-blockquote' // The implementation of the following function has been omitted. const renderChildren: (nodes: IYastNode[]) => string = function () {} const blockquote = { "type": "blockquote", "children": [ { "type": "text", "value": "yozora is cool!" } ] } renderBlockquote(blockquote as IBlockquote, renderChildren) // => <blockquote class="yozora-blockquote"><span class="yozora-text">yozora is cool!</span></blockquote>
Related
2.0.0-alpha.0
2 years ago
2.0.0-alpha.1
2 years ago
2.0.0-alpha.2
2 years ago
1.0.0-alpha.4
3 years ago
1.0.0-alpha.3
3 years ago
1.0.0-alpha.2
3 years ago
1.0.0-alpha.1
3 years ago
1.0.0-alpha.0
3 years ago