From 81612deab7dcdd7d56b35e6b046527ed55f31d20 Mon Sep 17 00:00:00 2001 From: "xiaoqi.cxq" Date: Fri, 30 Jun 2023 11:28:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E9=A2=98=E9=94=9A=E7=82=B9=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E6=98=AF=E6=95=B0=E5=AD=97=E5=BC=80=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/extensions/libs/markdownItAnchor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/extensions/libs/markdownItAnchor.js b/src/extensions/libs/markdownItAnchor.js index fd636c6b..8281c4a2 100644 --- a/src/extensions/libs/markdownItAnchor.js +++ b/src/extensions/libs/markdownItAnchor.js @@ -65,7 +65,9 @@ export default (md) => { let i; for (i = 0; i < slug.length; i += 1) { const charCode = slug.charCodeAt(i); - if ((charCode >= 0x61 && charCode <= 0x7A) || charCode > 0x7E) { + if ((charCode >= 0x30 && charCode <= 0x39) || // 0-9 + (charCode >= 0x61 && charCode <= 0x7A) || // a-z + charCode > 0x7E) { break; } }