[GH-ISSUE #955] Section title with accent leads to MD051 #2415

Closed
opened 2026-03-07 20:07:32 +03:00 by kerem · 3 comments
Owner

Originally created by @charlesbouchardlegare-qc on GitHub (Sep 5, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/955

A section title with accented character leads to MD051 but it should be valid.

# Title with à accented character

[Link](#title-with-à-accented-character)
3 - MD051 / link-fragments Link fragments should be valid [Context: "[Link](#title-with-à-accented-character)"]

demo

Originally created by @charlesbouchardlegare-qc on GitHub (Sep 5, 2023). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/955 A section title with accented character leads to MD051 but it should be valid. ``` # Title with à accented character [Link](#title-with-à-accented-character) ``` ``` 3 - MD051 / link-fragments Link fragments should be valid [Context: "[Link](#title-with-à-accented-character)"] ``` [demo](https://dlaa.me/markdownlint/#%25m%23%20Title%20with%20%C3%A0%20accented%20character%0A%0A%5BLink%5D(%23title-with-%C3%A0-accented-character)%0A)
kerem 2026-03-07 20:07:32 +03:00
Author
Owner

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

GitHub's implementation translates accented characters into their URI encoded form - in this case "%C3%A0". (You can confirm this by looking at what's generated by the little anchor tag for that link on GitHub.) If you use that expanded form for your link, no warning is generated. This rule looks for that canonical form to be used and is behaving correctly here.

https://dlaa.me/markdownlint/#%25m%23%20Title%20with%20%C3%A0%20accented%20character%0A%0A%5BLink%5D(%23title-with-%25C3%25A0-accented-character)%0A

<!-- gh-comment-id:1706910496 --> @DavidAnson commented on GitHub (Sep 5, 2023): GitHub's implementation translates accented characters into their URI encoded form - in this case "%C3%A0". (You can confirm this by looking at what's generated by the little anchor tag for that link on GitHub.) If you use that expanded form for your link, no warning is generated. This rule looks for that canonical form to be used and is behaving correctly here. https://dlaa.me/markdownlint/#%25m%23%20Title%20with%20%C3%A0%20accented%20character%0A%0A%5BLink%5D(%23title-with-%25C3%25A0-accented-character)%0A
Author
Owner

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

Documentation (see last paragraph): https://github.com/DavidAnson/markdownlint/blob/main/doc/md051.md

Relevant test cases: github.com/DavidAnson/markdownlint@c2c4a44931/test/link-fragments.md (L126-L128)

<!-- gh-comment-id:1706915646 --> @DavidAnson commented on GitHub (Sep 5, 2023): Documentation (see last paragraph): https://github.com/DavidAnson/markdownlint/blob/main/doc/md051.md Relevant test cases: https://github.com/DavidAnson/markdownlint/blob/c2c4a44931287c1420d937c38e85719a24c9c6a6/test/link-fragments.md?plain=1#L126-L128
Author
Owner

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

FYI on why this is newly reported from v0.29.0 to v0.30.0: https://github.com/DavidAnson/markdownlint/issues/954#issuecomment-1707634031

<!-- gh-comment-id:1707634524 --> @DavidAnson commented on GitHub (Sep 6, 2023): FYI on why this is newly reported from `v0.29.0` to `v0.30.0`: https://github.com/DavidAnson/markdownlint/issues/954#issuecomment-1707634031
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#2415
No description provided.