Skip to content

Releases: codeafix/mdlint-obsidian

v0.2.7 - Performance update

31 May 15:27

Choose a tag to compare

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

03 Mar 21:16
a4feead

Choose a tag to compare

Added badges to README on GitHub.
Added automated test and coverage checks.

v0.2.5

02 Mar 21:50

Choose a tag to compare

Add project urls to metadata.

v0.2.4

02 Mar 21:39

Choose a tag to compare

Fix redundant classifier in metadata.
Publish on PyPI.

v0.2.3

02 Mar 21:32

Choose a tag to compare

Release on PyPI.

v0.2.2

02 Mar 20:16
4233625

Choose a tag to compare

Fix to the GitHub workflow.

v0.2.1

02 Mar 20:01
c90f955

Choose a tag to compare

Patch release with no code change, just updated workflow to publish to TestPyPI.

v0.2.0 — Obsidian Compatibility Rules

01 Mar 19:24

Choose a tag to compare

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 ![alt](local/image.png); use ![[image.png]]
    instead
  • std-reference-link — flags [text][ref] usage and [ref]: url definitions
  • heading-no-space — flags #Heading; use # Heading instead
  • 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

01 Mar 18:15

Choose a tag to compare

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