File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
lib/render-content/plugins Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ const GithubSlugger = require('github-slugger')
2
2
const Entities = require ( 'html-entities' ) . XmlEntities
3
3
const toString = require ( 'hast-util-to-string' )
4
4
const visit = require ( 'unist-util-visit' )
5
- const slugger = new GithubSlugger ( )
6
5
const entities = new Entities ( )
7
6
8
7
const matcher = node => (
@@ -20,7 +19,7 @@ module.exports = function useEnglishHeadings ({ englishHeadings }) {
20
19
// find English heading in the collection
21
20
const englishHeading = englishHeadings [ entities . encode ( text ) ]
22
21
// get English slug
23
- const englishSlug = slugger . slug ( englishHeading )
22
+ const englishSlug = GithubSlugger . slug ( englishHeading )
24
23
// use English slug for heading ID and link
25
24
node . properties . id = englishSlug
26
25
} )
You can’t perform that action at this time.
0 commit comments