Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Mermaid does not treat every common word as a keyword everywhere. It parses your source according to the grammar for the diagram type you declare, so an ordinary word can be interpreted as syntax in a particular position. The lowercase word end is a documented trouble spot in flowcharts.

Why an ordinary word can affect a Mermaid diagram

A Mermaid definition is structured source, not unrestricted prose. Its opening declaration identifies the diagram type, and the corresponding grammar determines which tokens have structural meaning. As a result, a word that looks like ordinary label text may be significant to the parser in one diagram type or position but harmless in another.

Mermaid’s syntax reference warns that unknown words and misspellings can break diagrams, and identifies end as a diagram breaker for flowcharts and sequence diagrams. This is not an exhaustive list of reserved words, nor does it mean every listed word is reserved globally. The relevant grammar and the token’s position matter. Mermaid syntax reference

Why lowercase end breaks a flowchart

The flowchart guide specifically warns that lowercase end in a flowchart can break it. If you intend the word as displayed node text, capitalize one or more letters—for example, End or END—or use the guide’s documented workaround. Mermaid flowchart syntax

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When the problem is a label rather than a structural token, make that distinction explicit. The flowchart documentation shows quoted text as a way to include troublesome characters in node labels. The right fix depends on where the token occurs; quoting a label is not a universal way to change every part of a diagram’s grammar.

Check punctuation and token position, too

Some apparent keyword problems are actually punctuation ambiguities. In a flowchart, a lowercase o or x immediately after a link operator can be interpreted as a circle or cross edge rather than the beginning of node text. The flowchart guide recommends spacing or capitalization to disambiguate such cases. Inspect the characters immediately around the reported token, not just the word itself. Mermaid flowchart syntax

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Other diagram types can have different keyword rules

Do not assume that a workaround for a flowchart applies to every Mermaid diagram. Requirement diagrams, for example, document specific grammar keywords and warn that unquoted user text can fail when it is detected as another keyword. That is a diagram-specific parsing rule, not evidence that Mermaid has one universal list of reserved words. Mermaid requirement diagram syntax

Troubleshoot a word that Mermaid rejects

  1. Confirm the declaration. Check the first line or block that declares the diagram type; it determines which grammar parses the rest.
  2. Locate the exact token and position. Decide whether the word is intended as a node label, a structural token, or text adjacent to punctuation.
  3. Apply a grammar-appropriate fix. For a flowchart label containing lowercase end, capitalize it or use the documented workaround. Quote label text when the issue is troublesome characters in a label. For a possible o or x edge ambiguity, adjust spacing or capitalization.
  4. Validate the exact source. Mermaid’s parser API can check syntax without rendering. The documented mermaid.parse(text, parseOptions) call returns the diagram type for valid input and throws for invalid input unless errors are suppressed. Run the check against the Mermaid version used by the application that will display the diagram. Mermaid usage and API
  5. Compare host environments if results differ. If a diagram parses in Mermaid’s online tools but fails in an embedded application, check which Mermaid version that application bundles. The available documentation does not establish that every version behaves identically.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.