From 39fd51d7b03dc49466049fac6d59a44c65abfa55 Mon Sep 17 00:00:00 2001 From: haixuantao Date: Sat, 4 Jan 2025 12:19:29 +0100 Subject: [PATCH] Escape special character within description to avoid conflict with mermaid syntax --- libraries/core/src/descriptor/visualize.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/core/src/descriptor/visualize.rs b/libraries/core/src/descriptor/visualize.rs index 483a1889c..cfd00cacf 100644 --- a/libraries/core/src/descriptor/visualize.rs +++ b/libraries/core/src/descriptor/visualize.rs @@ -94,13 +94,13 @@ fn visualize_custom_node( ) { if node.run_config.inputs.is_empty() { // source node - writeln!(flowchart, " {node_id}[\\**{node_id}**{description}/]").unwrap(); + writeln!(flowchart, " {node_id}[\\\"**{node_id}**{description}\"/]").unwrap(); } else if node.run_config.outputs.is_empty() { // sink node - writeln!(flowchart, " {node_id}[/**{node_id}**{description}\\]").unwrap(); + writeln!(flowchart, " {node_id}[/\"**{node_id}**{description}\"\\]").unwrap(); } else { // normal node - writeln!(flowchart, " {node_id}[**{node_id}**{description}]").unwrap(); + writeln!(flowchart, " {node_id}[\"**{node_id}**{description}\"]").unwrap(); } }