Compare commits

..

1 Commits

Author SHA1 Message Date
renovate[bot]
322bb94c85 chore(deps): update peter-evans/create-pull-request digest to 46cdba7 2025-10-17 03:08:58 +00:00
4 changed files with 1 additions and 17 deletions

View File

@@ -1,5 +0,0 @@
---
'mermaid': patch
---
fix: Handle backslash parsing in math formulas within new flowchart shape syntax

View File

@@ -58,7 +58,7 @@ jobs:
echo "EOF" >> $GITHUB_OUTPUT
- name: Commit and create pull request
uses: peter-evans/create-pull-request@915d841dae6a4f191bb78faf61a257411d7be4d2
uses: peter-evans/create-pull-request@46cdba753c74545733b821043d64bd6925fc4da9
with:
add-paths: |
cypress/timings.json

View File

@@ -144,16 +144,6 @@ describe('when parsing directions', function () {
expect(data4Layout.nodes[0].shape).toEqual('rounded');
expect(data4Layout.nodes[0].label).toEqual('DD');
});
it('should handle mathematical formulas with backslashes in quoted strings', function () {
const res = flow.parser.parse(`flowchart TB
A@{ shape: rect, label: "$$\\sin x$$"}`);
const data4Layout = flow.parser.yy.getData();
expect(data4Layout.nodes.length).toBe(1);
expect(data4Layout.nodes[0].shape).toEqual('rect');
expect(data4Layout.nodes[0].label).toEqual('$$\\sin x$$');
});
it('should be possible to link to a node with more data', function () {
const res = flow.parser.parse(`flowchart TB
A --> D@{

View File

@@ -53,7 +53,6 @@ accDescr\s*"{"\s* { this.begin("acc_descr_multilin
// console.log('shapeData', yytext);
const re = /\n\s*/g;
yytext = yytext.replace(re,"<br/>");
yytext = yytext.replace(/\\/g, "\\\\");
return 'SHAPE_DATA'}
<shapeData>[^}^"]+ {
// console.log('shapeData', yytext);