【文件属性】:
文件名称:rehype-wrap:用给定元素包装所选元素
文件大小:39KB
文件格式:ZIP
更新时间:2021-05-16 05:30:44
html wrap rehype rehype-plugin JavaScript
重新包装
用给定元素包装所选元素
安装
npm i -S rehype-wrap
用法
const wrap = require ( 'rehype-wrap' )
const rehype = require ( 'rehype' )
rehype ( )
. use ( wrap , { /* options */ } )
. process ( /* html string */ )
. then ( /* vfile */ )
. catch ( /* handle any errors */ )
选项
wrap.selector
string
选择要包装的元素。 需要一个可以传递给hast-util-select的字符串选择器()。 如果未设置wrap.selector那么wrap将检查body元素并将所有元素包装在其中。 否则,如果没有body元素,则wra
【文件预览】:
rehype-wrap-master
----.gitignore(884B)
----package.json(1KB)
----readme.md(3KB)
----index.js(1KB)
----test.js(3KB)
----.travis.yml(81B)
----.editorconfig(193B)
----package-lock.json(137KB)