refactor: use unifiedjs esm packages

This commit is contained in:
Timothy Lin
2021-08-14 23:11:18 +08:00
parent 438a118edf
commit 2d700e28a2
8 changed files with 1163 additions and 945 deletions

View File

@@ -1,6 +1,6 @@
import visit from 'unist-util-visit'
import { visit } from 'unist-util-visit'
module.exports = function (options) {
export default function remarkTocHeadings(options) {
return (tree) =>
visit(tree, 'heading', (node, index, parent) => {
options.exportRef.push({