Skip to content

0.8.33

Choose a tag to compare

@github-actions github-actions released this 02 Sep 02:10
· 13 commits to develop since this release

Features

  • New setting markdown-preview-enhanced.exportColorScheme (default "theme") — 0.8.32 made HTML/browser exports follow the reader's system color scheme, so a document explicitly themed light rendered dark on a dark-OS machine (and one themed dark rendered light on a light-OS machine). Exports render in the configured previewTheme/codeBlockTheme again by default; set "auto" to follow the reader's system color scheme (light/dark theme pairs embedded under prefers-color-scheme), overridable per file with front matter html: { export_color_scheme: auto }. Paper exports (Chrome PDF, Prince) are not affected. Ships with crossnote 0.9.33 (#2382 reported by @dada-xiv).
  • Offline HTML export produces a portable single file — "Export HTML (offline)" used to emit file:// <link>/<script src> tags pointing at the local crossnote/dependencies/ directory (KaTeX CSS, Mermaid, WaveDrom, Vega, Reveal, Font Awesome), which break as soon as the file is copied to another machine. Those assets are now inlined into the document, with CSS font references rewritten to data: URIs (woff2 preferred). Open in Browser / Chrome PDF / Prince keep using local files so temporary documents are not bloated with a ~3.5MB mermaid bundle, and CDN export is unchanged (crossnote 0.9.33).
  • New markdown-preview-enhanced.frontMatterRenderingOption value: "vertical table" — renders front matter as a table with one key and value per row instead of one column per key, so the table stays inside the preview pane when there are many keys or long values (the layout VS Code's built-in preview uses). The setting also gained localized descriptions for all four values (#2371 reported by @JaeyeongYang; renders via crossnote 0.9.33).

Security

  • Stop the note index from scanning outside the workspace — when the resolved notebook root was the filesystem root itself (VS Code opened on / or a Windows drive root, a standalone Markdown file directly under it, or an untitled document whose fallback root /. resolves to /), building the wikilink/backlink/tag/graph index recursively stat'ed and read files across the whole machine; a symbolic link inside the workspace could similarly let the walk escape it. crossnote now refuses to index a filesystem-root notebook and never follows symbolic links during the walk (link entries are not indexed), and permission errors (EACCES/EPERM) encountered while walking are no longer logged as errors per directory. The extension shows a one-time warning when the notebook root is a filesystem root, since wikilinks/backlinks/graph will find nothing until a real folder is opened (#2376 reported by @prawnsalad; ships with crossnote 0.9.33).
  • Unsaved (untitled:) Markdown buffers now index against the current workspace — the notebook root for a non-file document used to resolve to the /. spelling of the filesystem root, the exact path that let clicking backlinks on an unsaved buffer trigger the whole-machine scan in #2376 (confirmed by the reporter). It is now the first workspace folder, so backlinks, wikilink completions and the graph view work on scratch buffers too; with no folder open, indexing is refused as before.
  • Validate the imgur upload endpoint override — the IMGUR_API_URL environment override was sent uploads (and the client id) without validation; it is now required to be an http(s) URL at a public host — localhost, *.local/*.internal, private, link-local (including cloud metadata addresses), and reserved ranges are rejected with a clear error (crossnote 0.9.33).

Bug fixes

  • Fix preview crash (TypeError: Cannot read properties of null (reading 'length')) on callouts with a blank line under the marker — an Obsidian-style callout whose [!NOTE] marker line stands alone or is followed by a blank quoted line crashed the entire preview; 0.8.32 introduced it via a crossnote callout change (#2375 reported by @GodExious; fixed in crossnote 0.9.33).
  • Fix footnotes rendered inside a callout title — an empty copy of the document's footnotes section appeared inside the callout title in addition to the real one at the bottom; footnotes now appear exactly once (#2377 reported by @chz-cn; fixed in crossnote 0.9.33).
  • Fix {highlight=...} bands rendering below the code block in most code themes, and covering code text with the vscode theme — only a couple of code themes carried the structural CSS for the highlight band, so it rendered in flow below the code; the structure now lives in the shared stylesheet, themes override just the band color, and with the vscode theme the band is blended to 35% opacity instead of painting VS Code's opaque selection color over the code (#2379 and #2378 reported by @chz-cn; fixed in crossnote 0.9.33).