-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
anchor id's are inconsistent #278
Comments
hey, it is replacing the characters it can't put into the hash with dashes. I'd think the problem is with the {{ rather than the way it makes hashes. Is it like that for templating or something? |
http://assemble.io/helpers/helpers-code.html
Yes, it's for documentation. So the problem is with the expectation that users should only use certain characters in headings for this solution to work. And if the HTML spec allows me to put those characters in the heading, then the problem is with the overly simplistic regex being used to slugify the heading. IMO, the implementation for headings is self-indulgent to maintain an ideal with the parser, rather than being sensitive to the needs of users. e.g. "Hey, since marked.js can only properly transform A-Z, don't use any other characters in headings and everything will be fine". I've already commented this effect here: #181 (comment) |
Ah I see there is some complicated history with this feature. I shouldn't butt in ;) |
Sorry if I came across like that. You have just as much of a right to weigh in on this as anyone else Sent from my iPhone
|
No I wasn't offended or anything don't worry. What do you think you would like the behavior to be for this? On Tue, Nov 5, 2013 at 10:51 AM, Jon Schlinkert [email protected]:
See my projects at dtrejo.com |
I like @ChrisWren's solution here: #181 (comment). However it's achieved I think a simple interface for custom functions would provide users with as much power and flexibility as they need. And really, I'd prefer almost any solution over having marked.js make decisions about how to attributes to my markup. |
you can now use the renderer to have custom ids |
This:
produces:
For this feature to be useable, I'm resorting to regex replacements on the ID's - which is just as hacky (and almost as much work) as implementing a complete workaround.
I love marked.js, we use it extensively on assemble projects, it would be great if one of the more complete PR's for this was merged in.
The text was updated successfully, but these errors were encountered: