DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk2 min

Why Lowercase `end` Breaks Mermaid Flowcharts—and How to Fix It

Lowercase `end` can break a Mermaid flowchart. Rename or capitalize the node ID, or use a safe ID while keeping `end` as its displayed label.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Lowercase end has special meaning in Mermaid flowchart syntax, so using it as a node ID can break the diagram. Rename or capitalize the ID, or use a safe ID and keep end as the visible label.

Why does a Mermaid flowchart fail on a node named end?

Mermaid’s official flowchart documentation warns that typing end in all lowercase letters will break a flowchart. The minimal reported example is state --> end, described in Mermaid GitHub issue #1444, opened June 5, 2020. Its author reported seeing the problem in VS Code Markdown Preview.

As an Amazon Associate I earn from qualifying purchases.

The issue is in the flowchart text being parsed, not necessarily in the editor or preview pane. The report does not identify the Mermaid version bundled with VS Code, and the documentation’s warning does not establish which versions or third-party hosts implement the same parser behavior.

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

How do you fix a node ID called end?

Capitalize the ID

If the displayed capitalization can change, replace the lowercase ID with End or END. Mermaid’s documentation says capitalizing the whole word or any of its letters avoids the lowercase form that breaks the flowchart.

flowchart LR
  start --> End

Keep the displayed label lowercase

If the box must read exactly end, give it a different, safe ID and put the desired text in the node label. Mermaid distinguishes a node’s identifier from the text displayed in its box:

flowchart LR
  start --> finish[end]

Here, finish is the ID used to refer to the node; end is the visible label. This applies Mermaid’s documented ID-and-label distinction to the reported problem. If your editor or site uses an older or customized Mermaid release, check the result in that host.

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

Which fix should you choose?

  • Use capitalization when changing the displayed case is acceptable; it is the quickest documented correction.
  • Use a different ID with a separate label when the visible text must remain lowercase end.

Mermaid’s reference links to an additional workaround, but its exact implementation is not described in the documentation material cited here. The two examples above are the fixes supported by the stated syntax guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Colortivity The Little Mermaid Ariel Themed Coloring and Activity Book with Bonus Cutout Door Hanger on Back - 80 Pages
  • The Little Mermaid-themed Coloring and Activity Book
  • Book contains 80 fun-filled coloring and activity pages!
  • Book measures approx 7.75'' x 10.75''
  • Cover varies-- contents do not (see photos)
  • Perfect for quiet indoor play

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.