Skip to content

Document escaping conflicting Mermaid syntax - #2911

Open
nightcityblade wants to merge 1 commit into
MarkBind:masterfrom
nightcityblade:fix/issue-2550
Open

Document escaping conflicting Mermaid syntax#2911
nightcityblade wants to merge 1 commit into
MarkBind:masterfrom
nightcityblade:fix/issue-2550

Conversation

@nightcityblade

@nightcityblade nightcityblade commented Jul 30, 2026

Copy link
Copy Markdown

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Fixes #2550

Overview of changes:

  • Added a focused tip to the Mermaid plugin documentation.
  • Included a copyable Gitgraph example that emits an initialization directive through a Nunjucks string expression.
  • Linked to the broader raw/endraw escaping guidance.

This documents how authors can use Mermaid directives containing conflicting braces without build or rendering errors.

Anything you'd like to highlight/discuss:

The example uses MarkBind's supported Nunjucks string-expression escape syntax so the Mermaid initialization directive reaches Mermaid unchanged.

Testing instructions:

No special setup is required. Build the user guide with npm run build:ug and inspect the Mermaid plugin page.

Validation already run:

  • npm run build:backend
  • npm run build:ug (41 pages built successfully; existing unrelated intra-link warnings remain)
  • git diff --check

Proposed commit message: (wrap lines at 72 characters)

docs: explain escaping Mermaid syntax


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

@gerteck

gerteck commented Jul 30, 2026

Copy link
Copy Markdown
Member

Hi @nightcityblade , thanks for your PR! We have a comprehensive PR template that we do require contributors to use.

@nightcityblade

Copy link
Copy Markdown
Author

Thanks for the reminder. I’ve updated the PR description using the repository’s complete template and filled each applicable section and checklist item.

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.

Mermaid diagrams: document how to escape conflicting syntax

2 participants