[GH-ISSUE #984] MD051: Link fragments should be valid [Context: "[Stream.\_\_init__](#2221-__init__)"] #579

Closed
opened 2026-03-03 01:28:10 +03:00 by kerem · 1 comment
Owner

Originally created by @wuwentao on GitHub (Sep 19, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/984

markdown title content as below:

##### 2.2.2.1 \_\_init__

TOC link can works with #2221-__init__

but reference text with this URL report error:

[Stream.\_\_init__](#2221-__init__)

current version:

markdownlint-cli2 v0.10.0 (markdownlint v0.31.1)

error log:

MD051/link-fragments Link fragments should be valid [Context: "[Stream.\_\_init__](#2221-__init__)"]
Originally created by @wuwentao on GitHub (Sep 19, 2023). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/984 markdown title content as below: ```markdown ##### 2.2.2.1 \_\_init__ ``` TOC link can works with `#2221-__init__` but reference text with this URL report error: ``` [Stream.\_\_init__](#2221-__init__) ``` current version: ``` markdownlint-cli2 v0.10.0 (markdownlint v0.31.1) ``` error log: ``` MD051/link-fragments Link fragments should be valid [Context: "[Stream.\_\_init__](#2221-__init__)"] ```
kerem 2026-03-03 01:28:10 +03:00
Author
Owner

@DavidAnson commented on GitHub (Sep 19, 2023):

Thanks, I suspect the escaping slashes are getting included incorrectly.

https://dlaa.me/markdownlint/#%25m%23%20Issue%20984%0A%0A%23%23%202.2.2.1%20%5C_%5C_init__%0A%0A%5BLink%5D(%232221-init)%0A

<!-- gh-comment-id:1724816117 --> @DavidAnson commented on GitHub (Sep 19, 2023): Thanks, I suspect the escaping slashes are getting included incorrectly. https://dlaa.me/markdownlint/#%25m%23%20Issue%20984%0A%0A%23%23%202.2.2.1%20%5C_%5C_init__%0A%0A%5BLink%5D(%232221-__init__)%0A
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#579
No description provided.