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 support for Gitiles section anchors and named anchors #570
Comments
This syntax for creating ID tags for headings (typcially with complex names) isn't supported in CommonMark, which is the standard used by our MD linter. It's valid syntax in Gitiles MD, which is why the links work. Upstream feature request to add support for this type of header ID: DavidAnson/markdownlint#570 This is required for submariner-io#827. Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
This syntax for creating ID tags for headings (typcially with complex names) isn't supported in CommonMark, which is the standard used by our MD linter. It's valid syntax in Gitiles MD, which is why the links work. Upstream feature request to add support for this type of header ID: DavidAnson/markdownlint#570 This is required for submariner-io#827. Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
This syntax for creating ID tags for headings (typically with complex names) isn't supported in CommonMark, which is the standard used by our MD linter. It's valid syntax in Gitiles MD, which is why the links work. Upstream feature request to add support for this type of header ID: DavidAnson/markdownlint#570 This is required for submariner-io#827. Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
This syntax for creating ID tags for headings (typically with complex names) isn't supported in CommonMark, which is the standard used by our MD linter. It's valid syntax in Gitiles MD, which is why the links work. Upstream feature request to add support for this type of header ID: DavidAnson/markdownlint#570 This is required for submariner-io#827. Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
This syntax for creating ID tags for headings (typically with complex names) isn't supported in CommonMark, which is the standard used by our MD linter. It's valid syntax in Gitiles MD, which is why the links work. Upstream feature request to add support for this type of header ID: DavidAnson/markdownlint#570 This is required for #827. Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
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. |
+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. |
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? |
@scottamain Please do. I think supporting named anchors is more straightforward and has value in isolation. |
Done: #830 |
+1 for adding support for gitiles flavored anchors. |
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.:
The text was updated successfully, but these errors were encountered: