bootstrap-toc
bootstrap-toc copied to clipboard
Remove paragraph symbol (´) from title text
I found myself patching bootstrap-toc with the following patch to remove ¶ from the end of headers that are frequently generated by anchor-links. These '¶' symbols are usually displayed when the title is hovered over, but would always be displayed in TOC generated by boostrap-toc. I can create a PR but it seems that this project is no longer merging PRs.
--- a/bootstrap-toc.js
+++ b/bootstrap-toc.js
@@ -89,7 +89,7 @@
generateNavItem: function(headingEl) {
var anchor = this.generateAnchor(headingEl);
var $heading = $(headingEl);
- var text = $heading.data("toc-text") || $heading.text();
+ var text = $heading.data("toc-text") || $heading.text().replace('´', '').replace('¶', '');
return this.generateNavEl(anchor, text);
},