fix:继续修正目录跳转锚点样式不正确的问题。

This commit is contained in:
徐涛
2021-07-01 14:01:22 +08:00
parent f250b86cf5
commit 58cddb3501
3 changed files with 11 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
hexo.extend.filter.register("marked:renderer", function(renderer) {
const { config } = this;
renderer.heading = function(text, level) {
return `<h${level} id="${text}">${text}</h${level}>`;
};
});