Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove paragraph symbol (´) from title text #70

Open
BoPeng opened this issue Jul 3, 2020 · 0 comments
Open

Remove paragraph symbol (´) from title text #70

BoPeng opened this issue Jul 3, 2020 · 0 comments

Comments

@BoPeng
Copy link

BoPeng commented Jul 3, 2020

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);
         },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant