【文件属性】:
文件名称:mdast-util-to-hast:将mdast转换为hast的实用程序
文件大小:41KB
文件格式:ZIP
更新时间:2021-04-27 21:02:58
html markdown syntax-tree unist mdast
mdast-util-to-hast
实用程序可以转换为 。
注意:您可能想使用 。
安装
该软件包 :需要使用Node 12+才能使用它,并且必须将其import而不是require d。
:
npm install mdast-util-to-hast
用
假设我们有以下example.md :
## Hello **World** !
…以及它旁边的example.js :
import fs from 'fs'
import fromMarkdown from 'mdast-util-from-markdown'
import { toHast } from 'mdast-util-to-hast'
import toHtml from 'hast-util-to-html'
var mdast = fromMarkdown ( fs . readFileSync
【文件预览】:
mdast-util-to-hast-main
----.gitignore(57B)
----package.json(2KB)
----.npmrc(19B)
----index.js(38B)
----tsconfig.json(355B)
----.github()
--------workflows()
----.prettierignore(15B)
----license(1KB)
----lib()
--------all.js(1KB)
--------revert.js(1KB)
--------one.js(2KB)
--------index.js(7KB)
--------wrap.js(670B)
--------handlers()
--------footer.js(2KB)
----readme.md(10KB)
----test()
--------footnote-reference.js(1KB)
--------footnote-definition.js(2KB)
--------paragraph.js(332B)
--------heading.js(342B)
--------toml.js(209B)
--------strong.js(321B)
--------table.js(3KB)
--------emphasis.js(321B)
--------index.js(776B)
--------list.js(2KB)
--------break.js(1KB)
--------definition.js(863B)
--------code.js(2KB)
--------list-item.js(5KB)
--------footnote-mixed.js(3KB)
--------link-reference.js(2KB)
--------image.js(888B)
--------html.js(401B)
--------link.js(1KB)
--------handlers-option.js(2KB)
--------thematic-break.js(296B)
--------text.js(2KB)
--------image-reference.js(2KB)
--------inline-code.js(688B)
--------yaml.js(209B)
--------delete.js(321B)
--------root.js(208B)
--------footnote.js(6KB)
--------core.js(4KB)
--------blockquote.js(652B)
----.editorconfig(147B)