Add fix in TOC JavaScript for in-page anchors
This commit is contained in:
parent
b03a669683
commit
9efc4d5445
|
@ -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>';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue