Skip to content

pantoken / rehype

rehype

实验性

@pantoken/rehype — 将 :icon: 代码渲染为内联 SVG。

该插件遍历 HAST 文本节点,并将 :code: 令牌替换为内联 SVG 元素, 通过一系列解析器解析每个代码:首先使用插件的 rehype 解析器,然后是任何显式的 resolve,接着是内置的 @pantoken/icons 集合。它将 rehype-instui-markdown 移植到 共享图标清单。

接口

函数

引用

default

重命名并重新导出 rehypePantokenIcons