diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7497143 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "web3", + "lockfileVersion": 2, + "requires": true, + "packages": {} +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/package.json @@ -0,0 +1 @@ +{} diff --git a/site/utils/documentExtract.js b/site/utils/documentExtract.js index 5dff749..868dd5d 100644 --- a/site/utils/documentExtract.js +++ b/site/utils/documentExtract.js @@ -1,13 +1,12 @@ import { unified } from 'unified' import remarkParse from 'remark-parse' -import find from 'unist-util-find' import { toString } from 'mdast-util-to-string' // get first paragraph found in the document const documentExtract = (md) => { const mdast = unified().use(remarkParse).parse(md); - let paragraph = find(mdast, (node) => node.type === "paragraph"); + let paragraph = mdast.children.find((node) => node.type === "paragraph"); return toString(paragraph); }