Open ekropotin opened 2 weeks ago
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.
It'd nice if NodeHeading provide an indication either given ATX-style header is closed or not:
vs
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.