[GH-ISSUE #658] Referency-style link labels with angle brackets trigger "no-inline-html" warning #2343

Closed
opened 2026-03-07 20:06:52 +03:00 by kerem · 0 comments
Owner

Originally created by @SvenGroot on GitHub (Nov 28, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/658

If you write a reference-style link, with a label that contains angle brackets, markdownlint will warn about inline HTML even though the label is not rendered and the angle brackets are not interpreted as HTML tags by any markdown application I've used.

Code example:

This is a [link with a label][Label<Foo>]

[Label<Foo>]: http://www.example.com

The following screenshot shows the markdownlint behavior:

image

As you can see, the warning is shown for both the usage and definition of the label.

My use case here is that I'm using a script to generate references to API documentation using C# type names, so in the case of generic types the label can look like [`List<T>`] (markdownlint still warns about this even with the backticks in the label). I want to be able to use [`List<T>`][], where the label matches the text, as much as possible, so I'd rather not change my labels just to work around spurious warnings.

Expected behavior: link labels should be ignored when processing the no-inline-html lint.
markdownlint version: v0.48.1

Originally created by @SvenGroot on GitHub (Nov 28, 2022). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/658 If you write a reference-style link, with a label that contains angle brackets, markdownlint will warn about inline HTML even though the label is not rendered and the angle brackets are not interpreted as HTML tags by any markdown application I've used. Code example: ```markdown This is a [link with a label][Label<Foo>] [Label<Foo>]: http://www.example.com ``` The following screenshot shows the markdownlint behavior: ![image](https://user-images.githubusercontent.com/18357361/204381414-9672d192-e852-43ef-b59f-1e1227a07ace.png) As you can see, the warning is shown for both the usage and definition of the label. My use case here is that I'm using a script to generate references to API documentation using C# type names, so in the case of generic types the label can look like ``[`List<T>`]`` (markdownlint still warns about this even with the backticks in the label). I want to be able to use ``[`List<T>`][]``, where the label matches the text, as much as possible, so I'd rather not change my labels just to work around spurious warnings. Expected behavior: link labels should be ignored when processing the no-inline-html lint. markdownlint version: v0.48.1
kerem 2026-03-07 20:06:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2343
No description provided.