You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<aid="top-of-page"></a>
MD: Go to [top](#top-of-page)
HTML: Go to <ahref="#top-of-page"></a>
On Github, it would be perfectly valid to go to https://github.com/[USER]/[REPO]#top-of-page but mkdx does not recognize these links as valid fragments. One thing to note with Github and manually inserting a fragment identifier is that the indexes of other (automatically generated) headings do not change. For example:
# This is a header
With some text
## This is a header
While the second header is a H2, the generated fragment will be "#this-is-a-header".
But since this is the second occurrence of this header, a "-[N+1]" suffix is appended.
When adding a fragment identifier like so:
# This is a header
With some text
<aid="this-is-a-header"></a>
## This is a header
This time there is an extra anchor using an "id" value of a header that already exists.
Instead of handling that scenario, GH seems to ignore it. The second occurrence of this header remains the same as in the previous example ("#this-is-a-header-1") and the "id" anchor is simply ignored all together. The only time one can jump to an <a id="..."> or <a name="..."> anchor is when no existing anchor for it exists.
The text was updated successfully, but these errors were encountered:
This is a proposal to add support to detect these types of links:
Currently, some work can be found in: https://github.com/SidOfc/mkdx/tree/patch/fragment-detection
On Github, it would be perfectly valid to go to
https://github.com/[USER]/[REPO]#top-of-page
but mkdx does not recognize these links as valid fragments. One thing to note with Github and manually inserting a fragment identifier is that the indexes of other (automatically generated) headings do not change. For example:While the second header is a H2, the generated fragment will be "#this-is-a-header".
But since this is the second occurrence of this header, a "-[N+1]" suffix is appended.
When adding a fragment identifier like so:
This time there is an extra anchor using an "id" value of a header that already exists.
Instead of handling that scenario, GH seems to ignore it. The second occurrence of this header remains the same as in the previous example ("#this-is-a-header-1") and the "id" anchor is simply ignored all together. The only time one can jump to an
<a id="...">
or<a name="...">
anchor is when no existing anchor for it exists.The text was updated successfully, but these errors were encountered: