- Added to
src/rules/heading_structure.rsto reuse heading extraction logic. - Implemented as a
LintWarningby default (Severity: Warning in docs). - Checks all headings in the document, regardless of level.
- Case-sensitive check for now, matching the most common
markdownlintimplementation.
- Storing all heading texts in a
HashSetmight consume slightly more memory for very large documents, but for typical markdown it is negligible.
- Added to
src/rules/whitespace.rs. - Warns when there are more than 2 consecutive newlines (i.e., more than one blank line).
- This aligns with the
compact_blank_linesoption in the formatter.
- Some people like extra spacing, but the "ideal" for LLMs is token efficiency, so multiple blank lines are discouraged.