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

NodeHeading should have a property, indicating ATX closed header #422

Open
ekropotin opened this issue Jun 16, 2024 · 1 comment
Open

NodeHeading should have a property, indicating ATX closed header #422

ekropotin opened this issue Jun 16, 2024 · 1 comment

Comments

@ekropotin
Copy link

It'd nice if NodeHeading provide an indication either given ATX-style header is closed or not:

# ATX style header

vs

# closed-ATX style header #

Motivation:

I'm working on markdown/commonmark linter, which is being powered by Comrak.
The linting rules are being ported from https://github.com/markdownlint/markdownlint.
One on the rules should be triggered when inconsistent heading styles are used across a document, for example, when there is a mix of ATX and closed ATX-style headers. To enforce this rule, I need to differentiate between regular ATX headers and closed ATX headers.

@kivikakk
Copy link
Owner

I'd be OK with adding this to Comrak. I should note, though, that in general it aims to provide an AST and not a CST/concrete syntax tree, so you might find a fair few other such things needing to be added to use it for a linter.

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

No branches or pull requests

2 participants