跳至正文
Wener Notes

unifiedjs

约 1 分钟阅读
TypeScript
import { micromark } from 'micromark';
import { gfm, gfmHtml } from 'micromark-extension-gfm';

const value = '* [x] done';

const result = micromark(value, {
  extensions: [gfm()],
  htmlExtensions: [gfmHtml()],
});

// 输出 HTML
console.log(result);

remark

  • remark-parse - markdown -> mdast
  • remark-stringify - mdast -> markdown
  • remark-gfm - GitHub Flavored Markdown
  • remark-toc - Table of Contents
  • remark-slug - slugify headings
  • remark-html - mdast -> HTML

rehype

ref

vfile

关联信息

反向链接、本文链接的其他页面和外部资料。

参考资料

GitHub12 条
依赖包1 条
其他外链2 条
最近更新commit 3d5e006编辑