diff --git a/tools/doc/doctool.config.json b/tools/doc/doctool.config.json index 23db08534f..a3e5baa794 100644 --- a/tools/doc/doctool.config.json +++ b/tools/doc/doctool.config.json @@ -21,7 +21,7 @@ "toc" ], "dev": [ - "fileChecker" + "toc" ] }, "statusIcons": { diff --git a/tools/doc/tools/toc.js b/tools/doc/tools/toc.js index 1a10eb1bfc..dbfef47942 100644 --- a/tools/doc/tools/toc.js +++ b/tools/doc/tools/toc.js @@ -135,7 +135,11 @@ function makeToc(tree) { context.headings.push({ "level": heading.item.depth - 2, "title": linkTitle, - "anchor": "#" + linkTitle.toLowerCase().replace(/ /g, "-").replace(/[:;@\.,'"`$\(\)\/]/g ,"") + //"anchor": "#" + linkTitle.toLowerCase().replace(/ /g, "-").replace(/[:;@\.,'"`$\(\)\/]/g ,"") + "anchor": "#" + linkTitle.toLowerCase() + .replace(/\W/g ,"-") + .replace(/-+/g, '-') + .replace(/-+$/, '') }) }; });