From 9d06f1c2122107934bb96c92c72939d0366a4054 Mon Sep 17 00:00:00 2001 From: Sam Pullman Date: Fri, 9 Apr 2021 11:25:14 +0800 Subject: [PATCH] fix: include emoji text in nav link to match toc Fix a comment typo --- src/node/markdown/markdown.ts | 2 +- src/node/markdown/plugins/slugify.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/markdown/markdown.ts b/src/node/markdown/markdown.ts index 6270babe2878..65afc71139cd 100644 --- a/src/node/markdown/markdown.ts +++ b/src/node/markdown/markdown.ts @@ -67,7 +67,6 @@ export const createMarkdownRenderer = ( }) // 3rd party plugins - .use(emoji) .use(anchor, { slugify, permalink: true, @@ -82,6 +81,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')