-
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
V0.3.6,<h1>,<h2>,<h3>,<h4>,<h5>,<h6>sometimes id are same #919
Comments
I have a same problem... |
I solved this by overriding
It seems to be natural to assume the above-mentioned behavior is a specification. |
I do it:
|
fix:Issue markedjs#919
There's no perfect way to generate IDs. The "naive" way to fix this would be to add a numeric counter to duplicate IDs, but that would require keeping track of all IDs. |
I still think the easiest way is to not have Marked do it. This is what I used to do back in the day for scrolling table of contents a la Bootstrap - http://getbootstrap.com/2.3.2/getting-started.html Step one: Convert Markdown to HTML. No JS solution = no TOC; therefore, no reason to have the IDs in the first place. Again, could just be asking Marked to do too much. If a spec has it, we should too but, if a spec has it, it should define the testable rules for implementing the solution, yeah? Note: I did not use Marked for processing back in the day. |
@tagia0212 ### do something() |
Closing as most likely going to be deprecated at a later date. |
The problem still exists. |
Yes, this problem still exists. Let's consolidate this issue with a similar one here: #1280 |
Sidenote: GitHub adding detail popovers on hover...fancy. 😎 |
test 01 [ok]
test 02 [the same id]
test 03 [the same id]
test 04 [the same id]
The text was updated successfully, but these errors were encountered: