-
-
Notifications
You must be signed in to change notification settings - Fork 741
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
MD051: Add an option to ignore case for automatically-generated heading identifiers #1274
Comments
The documentation you link explains why the example you show is reported as a violation:
|
Why is this example wrong? It exactly matches the case, so when the link anchor is treated case-sensitive than an exactly matching case should be valid and no violation! Is there a way to change the behaviour of this rule to ignore case or match case exactly?? |
As noted above, this rule matches the GitHub algorithm and that algorithm converts heading text to lower case. Work could be done here to allow mIxEd CaSe, but that would permit inconsistency without adding any functionality. |
I understood that it implements the GitHub algorithm but the wording in the documentation that I will add some background why we stumbled upon this: We write documentation in markdown and then we use mark to upload the documentation to Atlassian Confluence. Because Confluence is handling anchor links case sensitive this is a bit of a problem because we can't meet both requirements. I already added an issue to mark maybe they can transform the links on generation |
The parsers we use are also case-sensitive, so that enhancement would help. But they also handle whitespace differently, so maybe not sufficiently... However I had indeed read this documentation wrong, I read it as |
The example from the documentation reports
MD051/link-fragments: Link fragments should be valid [Expected #heading-name; Actual: #Heading-Name]
I expect the behavior as described in the example. The actual logic appears to have a bug.
The text was updated successfully, but these errors were encountered: