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

"." in the generated IDs #16

Open
tarciozemel opened this issue Jan 13, 2013 · 5 comments
Open

"." in the generated IDs #16

tarciozemel opened this issue Jan 13, 2013 · 5 comments

Comments

@tarciozemel
Copy link

One issue is: if a title have the "." char, the generated ID also have it and the anchor not works.

Great plugin, I use for years!

@jgallen23
Copy link
Owner

by default, uses toc with the header index. Are you using a custom anchorName function?

@Pilatch
Copy link

Pilatch commented Feb 18, 2015

This same problem happens with docstrap. I have a fix for it.

@jdittrich
Copy link

Same for me. It happens if I use the custom anchorName function to use the already existing id of the headline.

Remarks:

  • The problem occurs as well if the id/anchor name ends with a "."
  • It seems that selector query strings (the ones that jQuery uses, like #wrapper div.someclass) need to be escaped if they contain relevant characters like "." or "#". There is a CSS.escape() function in Firefox, though it is not used elsewhere yet. For this case, a polyfill exists.

@wudong
Copy link

wudong commented Jun 29, 2015

Also seems problematic when the heading have Colon (:) inside.

@leoncoderehab
Copy link

I also have this problem with a : ? or .

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

6 participants