Reimplement MD051/link-fragments using micromark tokens, report reference link issues for definition and fix when possible, handle reporting multiple violations on the same line better.

This commit is contained in:
David Anson 2023-08-04 20:53:38 -07:00
parent dd73b0ad7f
commit ef1bd286a9
14 changed files with 458 additions and 346 deletions

View file

@ -12,6 +12,8 @@
[Valid](#valid-heading-with-emphasis)
[Valid](#valid-heading-with-code)
[Valid](#valid-heading-with-quotes--and-double-quotes-)
[Valid](#-valid-heading-with-emoji)
@ -70,6 +72,10 @@ Text
Text
### Valid Heading With `Code`
Text
### Valid Heading With Quotes ' And Double Quotes "
Text
@ -157,9 +163,12 @@ Text
[Invalid](#not-an-id-should-be-ignored) {MD051}
[Invalid][badref] {MD051}
[Invalid {MD051}](#multi-line
"Title")
[badref]: #missing
[Invalid][badref]
[badref]: #missing "{MD051}"
## Inconsistent Case Fragments
@ -167,9 +176,12 @@ Text
[ALL CAPS](#NAMEDLINK) {MD051}
[MiXeD][mixedref] {MD051}
[Multi-line {MD051}](#NAMEDLINK
"Title")
[mixedref]: #idLINK
[MiXeD][mixedref]
[mixedref]: #idLINK "{MD051}"
## Valid Named Fragments