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
MD051 currently only checks <a> tags for id="..." attributes, but this requirement seems arbitrary. Any HTML element may have an id attribute to define an anchor.
It seems like this can be easily fixed by removing the check for a tags on line 58.
In my case, I have a table and use id attributes to link to specfic rows of the table:
# Example
<table>
<trid="foo"><td>Foo<td>Foo is good
<trid="bar"><td>Bar<td>Bar is also good
</table>
I like [foo](#foo) and [bar](#bar).
$ npx markdownlint test.md
test.md:8:8 MD051/link-fragments Link fragments should be valid [Context: "[foo](#foo) and [bar](#bar)"]
test.md:8:8 MD051/link-fragments Link fragments should be valid [Context: "[foo](#foo)"]
Would you be willing to accept a PR that fixes this, or is there some other reason why only a tags are accepted?
The text was updated successfully, but these errors were encountered:
MD051 currently only checks
<a>
tags forid="..."
attributes, but this requirement seems arbitrary. Any HTML element may have anid
attribute to define an anchor.It seems like this can be easily fixed by removing the check for
a
tags on line 58.In my case, I have a table and use
id
attributes to link to specfic rows of the table:Would you be willing to accept a PR that fixes this, or is there some other reason why only
a
tags are accepted?The text was updated successfully, but these errors were encountered: