diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/doctool/doctool.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/doctool/doctool.js b/tools/doctool/doctool.js index 4b4f2f07b7f..da31445fe13 100644 --- a/tools/doctool/doctool.js +++ b/tools/doctool/doctool.js @@ -88,6 +88,9 @@ function convertData(data) { .replace(/<hr><\/hr>/g, "<hr />") .replace(/(\<h[2-6])\>([^<]+)(\<\/h[1-6]\>)/gmi, function(o, ts, c, te) { return ts+' id="'+formatIdString(c)+'">'+c+te; + }) + .replace(/(\<h[3-4][^>]+\>)([^<]+)(\<\/h[3-4]\>)/gmi, function(o, ts, c, te) { + return ts+c+' <a href="#'+formatIdString(c)+'">#</a>'+te; }); return html; |