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