Address issue #35: Upgrade Mermaid to v11.12.1 for flowchart rendering#262
Merged
Address issue #35: Upgrade Mermaid to v11.12.1 for flowchart rendering#262
Conversation
- Upgrade Mermaid library from v8.4.3 to v11.12.1 - Update mermaid.init.js to use Promise-based API (Mermaid 10.x+) - Add async/await pattern for rendering calls - Add error handling with user-visible error messages - Add securityLevel: 'loose' for cross-origin rendering support The previous version (8.4.3 from 2020) had issues rendering flowchart diagrams with the graph TD syntax. The new version should resolve these rendering issues. Related to #35
- Add unique ID generation to prevent collisions on re-renders - Add check for mermaid library being loaded before initialization - Add logLevel: 'error' to suppress verbose console logging - Improve error message styling with padding and background Related to #35
Updated MANUAL_TEST_PLAN_ISSUE_18.md to reference the new Mermaid 11.x Promise-based API instead of the older Mermaid 8.0+ version. Related to #35
Merges recent changes from main including: - Bidirectional scroll sync (preview to editor) - CHANGELOG updates for version 3000.0.3 - Lists immediately after paragraphs fix - Plan files review and updates Related to #35
Using 'loose' could allow XSS attacks when opening untrusted Markdown files containing malicious Mermaid diagrams. The 'antiscript' level still allows HTML formatting in labels but strips <script> tags for better security. Related to #35
Contributor
Code Coverage ReportCurrent Coverage: 51.68% Coverage Details (Summary) |
This was referenced Jan 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR supersedes #193 with merge conflicts resolved.
securityLevel: 'loose'andlogLevel: 'error'to configurationRelated Issue
Related to #35
Supersedes #193
Manual Testing Plan
A comprehensive 16-test manual testing plan was created covering:
Review Notes