Skip to content

Commit

Permalink
Update remark-parse
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 14, 2020
1 parent 84d0880 commit 730ce48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/generate/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

var unified = require('unified')
var markdown = require('remark-parse')
var clear = require('unist-util-remove-position')

module.exports = generate

var processor = unified().use(markdown, {position: false})
var processor = unified().use(markdown)

function generate(ctx) {
var nodes = []
Expand All @@ -27,7 +28,8 @@ function generate(ctx) {
function noop() {}

function comment(node) {
return processor.parse(node.values.join('')).children
var tree = clear(processor.parse(node.values.join('')))
return tree.children
}

function code(node, ctx) {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@
"@babel/core": "^7.0.0",
"mdast-util-heading-range": "^2.0.0",
"nanoid": "^3.0.0",
"remark-parse": "^8.0.0",
"remark-parse": "^9.0.0",
"resolve-from": "^5.0.0",
"trough": "^1.0.0",
"unified": "^9.0.0"
"unified": "^9.0.0",
"unist-util-remove-position": "^3.0.0"
},
"devDependencies": {
"is-hidden": "^1.0.0",
Expand Down

0 comments on commit 730ce48

Please sign in to comment.