mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #1858] Special Characters in Heading Names violates Link Fragments Rule #2610
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2610
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JimFawkes on GitHub (Nov 14, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1858
Hello,
I am using german text in some markdown files. This results in some headings with special characters, for german these are
ä,ö,ü,Ä,Ö,Ü,ß. The correct anchor however does not contain these characters. They are translated toä->a,ö->o,ü->u,ß->s. For example, given a Heading calledÜberschrift, the valid Anchor is#uberschrift. This seems to violate the Link Fragment Rule.I looked at the options of the rule but I can not figure out how a regex could be built to ignore this behaviour since the regexes seem to work on the anchors rather than the actual heading (at least from what I understood).
I am currently ignoring the rule completely but I would rather solve this issue. Am I missing something or should I post this as a feature request?
@DavidAnson commented on GitHub (Nov 14, 2025):
The GitHub representation of the heading
# Überschriftis#%C3%BCberschriftand using that produces no issues:https://dlaa.me/markdownlint/#%25m%23%20Issue%201858%0A%0A%23%23%20%C3%9Cberschrift%0A%0A%5BTest%5D(%23%25C3%25BCberschrift)%0A
For reference:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent