Releases: codeafix/mdlint-obsidian
Releases · codeafix/mdlint-obsidian
v0.2.7 - Performance update
Performance
- O(N²) → O(N) linting. Previously, every rule module called is_in_code_block() once per line, and each call scanned the entire document to find fenced block ranges. On a 1,000-line note this meant ~8,000 full document scans per file. Code block ranges and the frontmatter boundary are now computed once per file in validate() and passed to all rules as a pre-built set — each line check is now an O(1) set lookup.
- Vault index built once per run. The broken-link checker previously called Path.rglob("*.md") for every note being linted. When linting a directory, the vault filesystem is now walked once and reused across all files.
Bug fixes
- False unclosed-highlight errors inside code blocks. == on lines inside fenced code blocks was incorrectly flagged as an unclosed highlight marker. This is now correctly suppressed.
Internal / developer-facing
- is_in_code_block() removed from utils.py — it was the source of the O(N²) behaviour and is no longer needed.
- All rule module check() functions now accept fm_end and code_block_lines as keyword parameters rather than recomputing them internally.
- README updated with the previously missing Compatibility rules section (7 rules: std-internal-link, std-internal-image, std-reference-link, heading-no-space, indented-code-block, raw-html, std-horizontal-rule).
- CONTRIBUTING.md updated with the new check() boilerplate and current coverage baseline (97%, 203 tests).
v0.2.6
v0.2.5
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0 — Obsidian Compatibility Rules
Adds 7 new rules that detect standard Markdown constructs Obsidian doesn't
support, helping you catch notes that won't render as expected.
New rules
- std-internal-link — flags
[text](note.md);use[[wikilink]]instead - std-internal-image — flags
;use![[image.png]]
instead - std-reference-link — flags
[text][ref]usage and[ref]: urldefinitions - heading-no-space — flags
#Heading;use# Headinginstead - indented-code-block — flags 4-space indented code; use a fenced ``` block
instead - raw-html — flags
<div>, <span>, and other known HTML elements - std-horizontal-rule — flags
***and___; use---instead
Notes
#tag(single # + single word) is recognised as an Obsidian tag and not
flagged by heading-no-space- raw-html only flags known HTML elements — custom angle-bracket syntax and
math expressions are safe - All new rules respect fenced code blocks
203 tests, 97% coverage.
mdlint-obsidian v0.1.0 — Initial release
Initial release of mdlint-obsidian, a Python library and CLI tool for linting
Obsidian Flavored Markdown files.
Features
- 22 lint rules across 9 categories: frontmatter, wikilinks, embeds, callouts,
code blocks, formatting, footnotes, tables, and math - Code-block-aware — all rules skip content inside fenced code blocks
- CLI (mdlint) — lint a single file or an entire vault recursively, with
--severity, --format json, and --vault flags - Python library — from mdlint_obsidian import validate for programmatic use
- Broken link detection — resolves [[wikilinks]] against the vault when
--vault is provided, with case-insensitive matching and alias/heading
stripping - 144 tests, 97% coverage
Installation
pip install git+https://github.com/you/mdlint-obsidian.git@v0.1.0