Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 2, 2021
1 parent 821be93 commit 4e8a681
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Slugger from 'github-slugger'
import has from 'hast-util-has-property'
import rank from 'hast-util-heading-rank'
import toString from 'hast-util-to-string'
import visit from 'unist-util-visit'
import {hasProperty} from 'hast-util-has-property'
import {headingRank} from 'hast-util-heading-rank'
import {toString} from 'hast-util-to-string'
import {visit} from 'unist-util-visit'

const slugs = new Slugger()

Expand All @@ -14,7 +14,7 @@ function transformer(tree) {
slugs.reset()

visit(tree, 'element', function (node) {
if (rank(node) && !has(node, 'id')) {
if (headingRank(node) && !hasProperty(node, 'id')) {
node.properties.id = slugs.slug(toString(node))
}
})
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
],
"dependencies": {
"github-slugger": "^1.1.1",
"hast-util-has-property": "^1.0.0",
"hast-util-heading-rank": "^1.0.0",
"hast-util-to-string": "^1.0.0",
"unist-util-visit": "^2.0.0"
"hast-util-has-property": "^2.0.0",
"hast-util-heading-rank": "^2.0.0",
"hast-util-to-string": "^2.0.0",
"unist-util-visit": "^4.0.0"
},
"devDependencies": {
"c8": "^7.0.0",
Expand Down

0 comments on commit 4e8a681

Please sign in to comment.