Open
Description
Describe the bug
- Current behavior: When generating docs with anchors, the html element
<a>
uses the deprecated attributename
- Expected behavior: It should use the
id
attribute as the html5 spec says
This is what MDN1 says about name
:
Deprecated
Was required to define a possible target location in a page. In HTML 4.01,
id
andname
could both be used on<a>
, as long as they had identical values.
This is what MDN says about id
2 and fragment identification3
The
id
global attribute defines an identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS).
How 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
Metadata
Metadata
Assignees
Labels
No labels