[GH-ISSUE #1858] Special Characters in Heading Names violates Link Fragments Rule #2610

Closed
opened 2026-03-07 20:09:18 +03:00 by kerem · 1 comment
Owner

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?

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?
kerem 2026-03-07 20:09:18 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Nov 14, 2025):

The GitHub representation of the heading # Überschrift is #%C3%BCberschrift and 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

<!-- gh-comment-id:3533855010 --> @DavidAnson commented on GitHub (Nov 14, 2025): The GitHub representation of the heading `# Überschrift` is `#%C3%BCberschrift` and 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
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#2610
No description provided.