toc支持小写占位符
This commit is contained in:
parent
fc74346b4b
commit
f5b4627083
@ -98,7 +98,7 @@ export default (md) => {
|
|||||||
return result;
|
return result;
|
||||||
}, '');
|
}, '');
|
||||||
}
|
}
|
||||||
if (token.type === 'inline' && token.content === '[TOC]') {
|
if (token.type === 'inline' && (token.content === '[TOC]' || token.content === '[toc]')) {
|
||||||
tocTokens.push(token);
|
tocTokens.push(token);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -107,7 +107,7 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
grammars.main['cn-toc'] = {
|
grammars.main['cn-toc'] = {
|
||||||
pattern: /^\[TOC\]$/gm,
|
pattern: /^\[(TOC|toc)\]$/gm,
|
||||||
};
|
};
|
||||||
for (let i = 6; i >= 1; i -= 1) {
|
for (let i = 6; i >= 1; i -= 1) {
|
||||||
grammars.main[`h${i} cn-head`] = {
|
grammars.main[`h${i} cn-head`] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user