Skip to content

Commit

Permalink
fix: include emoji text in nav link to match toc (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampullman authored Aug 20, 2021
1 parent 0c1a1f2 commit 80ff360
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/node/markdown/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export const createMarkdownRenderer = (
})

// 3rd party plugins
.use(emoji)
.use(anchor, {
slugify,
permalink: anchor.permalink.ariaHidden({}),
Expand All @@ -77,6 +76,7 @@ export const createMarkdownRenderer = (
format: parseHeader,
...options.toc
})
.use(emoji)

// apply user config
if (options.config) {
Expand Down
2 changes: 1 addition & 1 deletion src/node/markdown/plugins/slugify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const slugify = (str: string): string => {
.replace(rSpecial, '-')
// Remove continuos separators
.replace(/\-{2,}/g, '-')
// Remove prefixing and trailing separtors
// Remove prefixing and trailing separators
.replace(/^\-+|\-+$/g, '')
// ensure it doesn't start with a number (#121)
.replace(/^(\d)/, '_$1')
Expand Down

0 comments on commit 80ff360

Please sign in to comment.