mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #570] MD051: Add support for Gitiles section anchors and named anchors #2302
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#2302
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 @dholm on GitHub (Aug 30, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/570
Would it be possible to add a configuration option for MD051 to support section anchors as defined by Gitiles markdown? I believe they pretty much follow the same convention as GitHub but they keep the case of each character rather than forcing them to lowercase.
It would also be nice if their named anchors could be supported, e.g.:
@DavidAnson commented on GitHub (Nov 4, 2022):
As I understand the specification you link to, there are a few differences:
None of this is unreasonable, but overall it represents more than a trivial tweak to the logic of the existing rule.
@fekete-robert commented on GitHub (Jan 25, 2023):
+1 for adding support to custom header ids. They are supported in a number of static site generators (for example, Hugo and docusaurus), and in these contexts this markdownlint rule throws a false positive.
@scottamain commented on GitHub (May 23, 2023):
I'm very interested in just the second part of this request, so that MD051 will not flag this as an invalid link:
Currently, I need to disable MD051 (and use a separate linkchecker) because this use-case is important to me.
Should this be filed as a separate enhancement request?
@DavidAnson commented on GitHub (May 23, 2023):
@scottamain Please do. I think supporting named anchors is more straightforward and has value in isolation.
@scottamain commented on GitHub (May 24, 2023):
Done: https://github.com/DavidAnson/markdownlint/issues/830
@Svintooo commented on GitHub (Jun 9, 2023):
+1 for adding support for gitiles flavored anchors.
My company uses gerrit with gitiles for all development, and uses markdownlint in all CI pipelines. And broken links slips through from time to time because MD051 needs to be disabled.