diff --git a/src/node/markdown/markdown.ts b/src/node/markdown/markdown.ts index f27e5551acdc..7e59bddb761e 100644 --- a/src/node/markdown/markdown.ts +++ b/src/node/markdown/markdown.ts @@ -65,7 +65,6 @@ export const createMarkdownRenderer = ( }) // 3rd party plugins - .use(emoji) .use(anchor, { slugify, permalink: anchor.permalink.ariaHidden({}), @@ -77,6 +76,7 @@ export const createMarkdownRenderer = ( format: parseHeader, ...options.toc }) + .use(emoji) // apply user config if (options.config) { diff --git a/src/node/markdown/plugins/slugify.ts b/src/node/markdown/plugins/slugify.ts index 33d0fe3251e6..f0d5f30c35b8 100644 --- a/src/node/markdown/plugins/slugify.ts +++ b/src/node/markdown/plugins/slugify.ts @@ -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')