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
Anchors are generated with the deprecated attribute name
instead of id
#629
Comments
Can we have an update on this please? Using "name" instead of "id" breakes anchor links on our generated README files. It seems to be a relatively easy fix |
PR. We now pray to the gods |
If using markdownlint-cli, this breaks MD051.
|
Are you sure about this?, the rule states:
Changing IMO, this should be addressed in a separate issue. Maybe adding a |
You are correct @marrws, sorry about that. Rereading the documentation, it appears that the Here is the actual issue: DavidAnson/markdownlint#956. It is within the markdownlint parser itself. |
Describe the bug
<a>
uses the deprecated attributename
id
attribute as the html5 spec saysThis is what MDN1 says about
name
:This is what MDN says about
id
2 and fragment identification3How can we reproduce it?
Generate docs with the
--anchor=true
flag.My guess is that this line is responsible for this behavior:
terraform-docs/template/anchor.go
Lines 24 to 25 in 1f686b1
Footnotes
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-name ↩
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id ↩
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web#fragment ↩
The text was updated successfully, but these errors were encountered: