Skip to content

0.9.25

Choose a tag to compare

@github-actions github-actions released this 16 May 15:39
66245b9

Breaking changes

  • Rename mathjaxV3ScriptSrc to mathjaxScriptSrc. The default MathJax script source now loads MathJax 4 (https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js) instead of MathJax 3. Users who have a custom mathjaxV3ScriptSrc in their .crossnote/config.js must rename the key. The MathJax v4 configuration API is backward-compatible with v3 configurations.

New features

  • MathJax v4 support — Upgrade the default MathJax CDN URL from mathjax@3 to mathjax@4. The script loading attribute is changed from async to defer (per MathJax v4 recommendation). The MathJax.startup.document.state(0) call is removed from the client-side typesetting pipeline — MathJax.typesetPromise() already resets state internally. Fixes vscode-mpe#2298.
  • Block-level $$ math parsing — Add a math_block block rule (before markdown-it's lheading Setext parser) to prevent multi-line $$…$$ blocks from being split by Setext heading detection. Previously, a $$ block containing = on its own line (e.g. matrix multiplication \end{pmatrix} = \begin{pmatrix}) would be split into an <h1> heading and a dangling paragraph. The new block rule consumes the full $$…$$ block before the Setext or paragraph parsers see it. Works for both KaTeX and MathJax renderers, and respects user-configured mathBlockDelimiters.
  • Obsidian-style wiki link resolution — New wikiLinkResolution config option ('shortest' | 'relative' | 'absolute', default 'relative') controls how bare-filename wiki links like [[Note]] are resolved. 'shortest' searches all notes globally by filename, preferring the shortest unique path (with same-directory tiebreaking). 'absolute' resolves from the notebook root. 'relative' preserves the existing behavior (resolve relative to the current note's directory). Links starting with / always resolve from the notebook root regardless of this setting. The resolution logic is exposed as notebook.resolveWikilink() and used consistently by both index-time mention tracking and render-time ![[note]] embed resolution. Fixes #424.

Bug fixes

  • Fix multi-line $$ math blocks (matrices, aligned equations, etc.) being split by markdown-it's Setext heading parser when the block contains = on its own line.
  • Fix #tag CSS pill styling overriding Prism syntax highlighting for XML/HTML tags in code blocks. The .markdown-preview span.tag selector now uses span.tag:not(.token) so it no longer matches <span class="token tag"> elements inside <code> blocks. Fixes vscode-mpe#2295.
  • Fix Pandoc-style fenced div attributes (::: {.class1 .class2 #id}) not being parsed. The colon fence parser and transformer now properly extract classes, ids, and key=value attributes from {...} blocks so ::: {.test .vertical} renders as <div class="test vertical"> instead of raw :::. Fixes vscode-mpe#2275.

Performance

  • Parallel mermaid rendering with client-side cache — Fix the forEach(async) fire-and-forget bug that caused mermaid rendering promises to be silently lost. Parse all mermaid diagrams in parallel (Promise.all) instead of sequential for loop. Add a client-side SVG cache keyed by source code so unchanged diagrams are not re-parsed or re-rendered on preview refresh. Add a 30-second per-diagram timeout to prevent a single malformed or extremely large diagram from hanging the entire preview.
  • Fix PlantUML server rendering returning raw binary image data in the output when the server responds with Content-Type: image/* instead of SVG text. The renderer now detects image responses and converts them to base64 <img> data URIs instead of treating binary data as text. Fixes #416.

Updates

  • Update mermaid version to the latest 11.15.0.
  • Update katex version to the latest 0.16.47.