mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #606] MD051 option for space replacement character #2324
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#2324
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 @nschonni on GitHub (Oct 12, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/606
Currently the space is swapped by
-, I think there have been one or to other parsers that flagged that they use_instead, so it might help to keep the default, but allow overriding this.This is the current replacement, that would need to take the option:
I was wondering if some larger configurability might be needed for the different anchor link patterns, but maybe this would be enough
@DavidAnson commented on GitHub (Dec 8, 2022):
I clarified that this rule implements the GitHub anchor algorithm here: https://github.com/DavidAnson/markdownlint/blob/next/doc/md051.md
I am going to close this issue as I don't think I will change the current behavior unless it is to support another algorithm entirely or perhaps make it configurable someday. So far, neither has seemed necessary.
@DavidAnson commented on GitHub (Dec 8, 2022):
Update: A request for a different algorithm entirely: https://github.com/DavidAnson/markdownlint/issues/570
@nschonni commented on GitHub (Dec 8, 2022):
Yes, this is a lighter version compared to that issue. The main use case I have for this is coming from the mdn/content repo. Since they migrated from a Wiki format to markdown, they maintained the
_style replacement@connorads commented on GitHub (Feb 24, 2023):
I've also faced similar issue with
MD051and Backstage TechDocs which replaces-(space dash space) with-(dash)Interesting that MDN have chosen to disable
MD051because of different algorithm in their docs system yarihttps://github.com/mdn/content/blob/main/.markdownlint-cli2.jsonc#L117-L118
Would be great to be able to configure this somehow as
MD051does great work to keep them links working!In the meantime I've been looking for a way to stop people from using
-in headings.