mirror of
https://gitee.com/mafgwo/stackedit
synced 2024-11-16 03:32:40 +08:00
标题锚点可以是数字开头
This commit is contained in:
parent
282b546edc
commit
81612deab7
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user