remark-extract-toc

时间:2021-04-05 19:57:20
【文件属性】:
文件名称:remark-extract-toc
文件大小:98KB
文件格式:ZIP
更新时间:2021-04-05 19:57:20
JavaScript 备注提取目录 这是一个插件,用于将文档目录附加到VFile。 如何安装 yarn add @stefanprobst/remark-extract-toc 如何使用 const remark = require ( "remark" ) const withSlugs = require ( "remark-slug" ) const withToc = require ( "@stefanprobst/remark-extract-toc" ) const processor = remark ( ) . use ( withSlugs ) . use ( withToc ) const { data , contents } = processor . processSync ( doc ) console . dir ( data . toc , { depth : null } )
【文件预览】:
remark-extract-toc-main
----package.json(2KB)
----test()
--------index.test.js(3KB)
--------fixtures()
----src()
--------index.js(1KB)
----.gitignore(33B)
----README.md(941B)
----yarn.lock(236KB)

网友评论