Skip to content

fix: resolve post-PR#116 regressions in markdown rendering, mermaid, …#117

Merged
ThisIs-Developer merged 1 commit into
mainfrom
fix/post-pr116-regression-fixes
May 26, 2026
Merged

fix: resolve post-PR#116 regressions in markdown rendering, mermaid, …#117
ThisIs-Developer merged 1 commit into
mainfrom
fix/post-pr116-regression-fixes

Conversation

@ThisIs-Developer
Copy link
Copy Markdown
Owner

BREAKING FIXES:

  • Fix ReferenceError: Defer marked.Renderer instantiation and marked.use() configuration into initializeMarked(), called only after core libraries (marked, hljs, DOMPurify) are lazy-loaded. Prevents synchronous access to undefined globals on page load.

  • Fix Mermaid v11 compatibility: Replace deprecated m.init() with m.run() API, matching Mermaid v11.6.0 shipped via CDN.

  • Add Neutralino offline routing: loadDependency() and loadStylesheet() now detect the Neutralino desktop runtime and redirect CDN URLs to local /libs/ paths, skipping SRI integrity checks that would fail on local file:// or localhost origins.

  • Extend prepare.js: Scan script.js for CDN URLs in addition to index.html, ensuring all dynamically loaded dependencies are downloaded to resources/libs/ for offline desktop builds.

  • Add network resilience: ensureEmoji(), ensurePako(), and ensurePdfExportDependencies() now clear their cached promise on failure, allowing retry on subsequent calls.

  • Optimize PDF export: Remove unnecessary pdfmake/vfs_fonts/html2pdf from ensurePdfExportDependencies() since only jspdf + html2canvas are used by the active export pipeline.

…and offline desktop mode

BREAKING FIXES:
- Fix ReferenceError: Defer marked.Renderer instantiation and marked.use()
  configuration into initializeMarked(), called only after core libraries
  (marked, hljs, DOMPurify) are lazy-loaded. Prevents synchronous access
  to undefined globals on page load.

- Fix Mermaid v11 compatibility: Replace deprecated m.init() with m.run()
  API, matching Mermaid v11.6.0 shipped via CDN.

- Add Neutralino offline routing: loadDependency() and loadStylesheet()
  now detect the Neutralino desktop runtime and redirect CDN URLs to
  local /libs/<filename> paths, skipping SRI integrity checks that would
  fail on local file:// or localhost origins.

- Extend prepare.js: Scan script.js for CDN URLs in addition to
  index.html, ensuring all dynamically loaded dependencies are
  downloaded to resources/libs/ for offline desktop builds.

- Add network resilience: ensureEmoji(), ensurePako(), and
  ensurePdfExportDependencies() now clear their cached promise on
  failure, allowing retry on subsequent calls.

- Optimize PDF export: Remove unnecessary pdfmake/vfs_fonts/html2pdf
  from ensurePdfExportDependencies() since only jspdf + html2canvas
  are used by the active export pipeline.
Copilot AI review requested due to automatic review settings May 26, 2026 10:25
@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment May 26, 2026 10:25am

@ThisIs-Developer ThisIs-Developer merged commit 45da5ad into main May 26, 2026
6 of 7 checks passed
@ThisIs-Developer ThisIs-Developer deleted the fix/post-pr116-regression-fixes branch May 26, 2026 10:32
@ThisIs-Developer ThisIs-Developer review requested due to automatic review settings May 26, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant