Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Rule to disallow links in headings #1308

Open
Arty-chan opened this issue Jul 26, 2024 · 0 comments
Open

[Proposal] Rule to disallow links in headings #1308

Arty-chan opened this issue Jul 26, 2024 · 0 comments
Labels

Comments

@Arty-chan
Copy link

A lot of markdown renderers on sites auto-create anchor links to headings.

While if there is a link in a heading, the anchor will still work, clicking on the heading can lead you to the specified link instead of giving you the anchor link. This disrupts the default behaviour of the heading.

It's particularly problematic in something that is generated off the headings. For example, if you have a table of contents generated from the headings, many generators will not strip out the link, so when you click on the heading in the table of contents, it goes to the specified link instead of to the heading on the current page.

I'm creating a custom rule in another linter (vale) so it's not a priority for me, but thought this would be a good idea to include as a rule in markdownlint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants