dag: mermaid: Use quotation marks to escape node name.

Fixes #7731
This commit is contained in:
David de la Iglesia Castro
2022-05-24 18:27:58 +02:00
parent 68b0d61c9e
commit 109d0e4e28
2 changed files with 13 additions and 13 deletions
+12 -12
View File
@@ -165,12 +165,12 @@ def test_show_mermaid(repo):
line.rstrip() for line in _show_mermaid(repo.index.graph).splitlines()
] == [
"flowchart TD",
"\tnode1[stage: '1']",
"\tnode2[stage: '2']",
"\tnode3[stage: '3']",
"\tnode4[stage: '4']",
"\tnode5[stage: 'a.dvc']",
"\tnode6[stage: 'b.dvc']",
"\tnode1[\"stage: '1'\"]",
"\tnode2[\"stage: '2'\"]",
"\tnode3[\"stage: '3'\"]",
"\tnode4[\"stage: '4'\"]",
"\tnode5[\"stage: 'a.dvc'\"]",
"\tnode6[\"stage: 'b.dvc'\"]",
"\tnode3-->node4",
"\tnode5-->node1",
"\tnode5-->node3",
@@ -190,12 +190,12 @@ def test_show_mermaid_markdown(repo, dvc, capsys, mocker):
] == [
"```mermaid",
"flowchart TD",
"\tnode1[stage: '1']",
"\tnode2[stage: '2']",
"\tnode3[stage: '3']",
"\tnode4[stage: '4']",
"\tnode5[stage: 'a.dvc']",
"\tnode6[stage: 'b.dvc']",
"\tnode1[\"stage: '1'\"]",
"\tnode2[\"stage: '2'\"]",
"\tnode3[\"stage: '3'\"]",
"\tnode4[\"stage: '4'\"]",
"\tnode5[\"stage: 'a.dvc'\"]",
"\tnode6[\"stage: 'b.dvc'\"]",
"\tnode3-->node4",
"\tnode5-->node1",
"\tnode5-->node3",