Commit 9efc4d54 authored by Marcel Stör's avatar Marcel Stör
Browse files

Add fix in TOC JavaScript for in-page anchors

parent b03a6696
......@@ -35,8 +35,8 @@ var nodemcu = nodemcu || {};
}
function createTocTableRow(func, intro) {
// fragile attempt to auto-create the in-page anchor
var href = func.replace(/\./g, '').replace('()', '').replace(' --', '-');
var link = '<a href="#' + href + '">' + func + '</a>';
var href = func.replace(/\.|:/g, '').replace('()', '').replace(' --', '-').replace(/ /g, '-');
var link = '<a href="#' + href.toLowerCase() + '">' + func + '</a>';
return '<tr><td>' + link + '</td><td>' + intro + '</td></tr>';
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment