From 154abf59a6153e84b018fcdffa86892776d6da7d Mon Sep 17 00:00:00 2001 From: anikethsaha Date: Tue, 24 Mar 2020 18:47:43 +0530 Subject: [PATCH] fix: digit issue with sidebar (complete REVERT to old method) --- src/core/render/slugify.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/render/slugify.js b/src/core/render/slugify.js index c6bda03d..1d3c24b3 100644 --- a/src/core/render/slugify.js +++ b/src/core/render/slugify.js @@ -18,7 +18,8 @@ export function slugify(str) { .replace(/<[^>\d]+>/g, '') .replace(re, '') .replace(/\s/g, '-') - .replace(/-+/g, '-'); + .replace(/-+/g, '-') + .replace(/^(\d)/, '_$1'); let count = cache[slug]; count = hasOwn.call(cache, slug) ? count + 1 : 0;