fix(app): draw Mermaid flowcharts whose labels contain an @ (#10165)
Mermaid 11's lexer reads an edge id (`e1@-->`) from any run of non-space characters ending in "@". In `F[@mention] --> G` that run starts at the node id and crosses the label's opening bracket, so the parse fails and the card falls back to the source. Backport the lexer half of mermaid-js/mermaid#8459, which stops the edge id at the node shape characters, onto the pinned mermaid 11.16.0 and rebuild the runtime. Moving to mermaid 12 instead changes the default layout and look of every diagram and raises the browser floor, so it stays a separate decision. Closes #10157 Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com> Co-authored-by: monarchmaisuriya <37824914+monarchmaisuriya@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4 files changed
+52
-1
No files matched your search
@@ -86,6 +86,12 @@ const patchedPackages = [
|
||||
nodeModulesPath: "node_modules/@mattermost/react-native-paste-input",
|
||||
patchPrefix: "@mattermost+react-native-paste-input+",
|
||||
},
|
||||
// Backport of https://github.com/mermaid-js/mermaid/pull/8459 (lexer half): a flowchart label
|
||||
// with an "@" parses. The patch header has the details. Remove when the app uses mermaid 12.
|
||||
{
|
||||
nodeModulesPath: "node_modules/mermaid",
|
||||
patchPrefix: "mermaid+",
|
||||
},
|
||||
{
|
||||
nodeModulesPath: "packages/server/node_modules/@opencode-ai/sdk",
|
||||
patchPrefix: "@opencode-ai+sdk+",
|
||||
|
||||
Reference in new issue
Block a user