Skip to content

v0.2.44

Choose a tag to compare

@zzstoatzz zzstoatzz released this 22 Jun 19:01
· 1 commit to main since this release
c95664f

Fix: track code fences line-by-line in the MDX escaper

Supersedes the regex-based escaping in v0.2.43. Griffe's Examples sections sometimes emit an unterminated ```python fence; MDX auto-closes it, but the regex required a closing fence and so escaped braces inside the trailing code (print(f"hello {name}") → print(f"hello \{name\}")).

Replaced with a line-based scanner that toggles fence state on ``` lines (mirroring CommonMark/MDX, including auto-close) and only escapes non-fenced lines. Inline code is matched single-line so multi-line backtick spans fall through to prose escaping.

Full changelog: #46