mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4013] Fixed anchor generation in ToC doc tool (#4263)
This commit is contained in:
committed by
Eugenio Romano
parent
3a5fe3fb92
commit
947c55fbeb
@@ -21,7 +21,7 @@
|
||||
"toc"
|
||||
],
|
||||
"dev": [
|
||||
"fileChecker"
|
||||
"toc"
|
||||
]
|
||||
},
|
||||
"statusIcons": {
|
||||
|
@@ -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(/-+$/, '')
|
||||
})
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user