[GH-ISSUE #1424] MD051 - Support alternate heading link algorithms #683

Closed
opened 2026-03-03 01:29:02 +03:00 by kerem · 4 comments
Owner

Originally created by @otteydw on GitHub (Nov 18, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1424

My team primarily uses Bitbucket which has an alternate algorithm for linking to headings. In the case of Bitbucket, they want the linked headings to begin with #markdown-header- such that a link to the header "My Header" would need to be [my header](#markdown-header-my-header).

I don't know if there are other algorithms around (and I truly wish that Bitbucket did not use this uncommon algorithm), I was wondering if an option could be added to rule MD051 that supported Bitbucket's algorithm specifically? Or maybe an option to allow us to specify a header prefix that we should require for the link fragment to be valid?

Originally created by @otteydw on GitHub (Nov 18, 2024). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1424 My team primarily uses Bitbucket which has an alternate algorithm for linking to headings. In the case of Bitbucket, they want the linked headings to begin with `#markdown-header-` such that a link to the header "My Header" would need to be `[my header](#markdown-header-my-header)`. I don't know if there are other algorithms around (and I truly wish that Bitbucket did not use this uncommon algorithm), I was wondering if an option could be added to rule MD051 that supported Bitbucket's algorithm specifically? Or maybe an option to allow us to specify a header prefix that we should require for the link fragment to be valid?
kerem 2026-03-03 01:29:02 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Nov 18, 2024):

Duplicate of https://github.com/DavidAnson/markdownlint/issues/547#issuecomment-1361218474

I'll revisit this soon.

<!-- gh-comment-id:2484121665 --> @DavidAnson commented on GitHub (Nov 18, 2024): Duplicate of https://github.com/DavidAnson/markdownlint/issues/547#issuecomment-1361218474 I'll revisit this soon.
Author
Owner

@otteydw commented on GitHub (Nov 18, 2024):

Ugh, I swear I did search for it. I'm not sure how I missed that. Thank you.

<!-- gh-comment-id:2484145664 --> @otteydw commented on GitHub (Nov 18, 2024): Ugh, I swear I did search for it. I'm not sure how I missed that. Thank you.
Author
Owner

@otteydw commented on GitHub (Nov 18, 2024):

Sorry, I'm actually not sure if I should have closed this or not. Please re-open if you need that for tracking.

<!-- gh-comment-id:2484148894 --> @otteydw commented on GitHub (Nov 18, 2024): Sorry, I'm actually not sure if I should have closed this or not. Please re-open if you need that for tracking.
Author
Owner

@DavidAnson commented on GitHub (Nov 18, 2024):

It's cool. :) I have a private TODO list I use for tracking.

<!-- gh-comment-id:2484268973 --> @DavidAnson commented on GitHub (Nov 18, 2024): It's cool. :) I have a private TODO list I use for tracking.
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#683
No description provided.