-
Notifications
You must be signed in to change notification settings - Fork 174
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
ID's are not generated on header elements #186
Comments
https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/toc_filter.rb Here is a ruby example of the implementation I believe.
|
For a real-world example of this issue, see: |
Explicitly adding HTML links with ids after headers is one way of working around all this. The following creates a fully linked readme that will also work on other platforms (such as PyPI for the above comment): Contents:<a id="contents"></a> [Section Header](#section-header)
# Section Header [`↩`](#contents) <a id="section-header"></a> See any of my projects for an example of how it functions. |
Generating header IDs is a crucial feature, in my opinion. Doing how @andrewtavis suggested is feasible as a temporary solution to adopt only when it is fundamental to have a reference to the header; nevertheless, writing that much markup only to get what can easily be automated seems very cumbersome and useless. |
As commonmark does not generate ids for its headers see, github/cmark-gfm#186 we need the possibility to generate them when creating anchor headings.
As commonmark does not generate ids for its headers see, github/cmark-gfm#186 we need the possibility to generate them when creating anchor headings.
As commonmark does not generate ids for its headers see, github/cmark-gfm#186 we need the possibility to generate them when creating anchor headings.
I noticed a peculiarity in that headers are not generated on H elements.
# My Title
should evaluate to<h1 id="my-title">My Title</h1>
Instead it evaluates to
<h1>My Title</h1>
.This makes internal links not possible, which is a rather large issue since MD is often used for documentation.
The text was updated successfully, but these errors were encountered: