fix: correct mermaid flowchart edge label syntax (-->|label| not --|"label"|)
This commit is contained in:
@@ -225,17 +225,17 @@ impl MermaidRenderer {
|
||||
}
|
||||
|
||||
for ((source, target), count) in &module_edges {
|
||||
let arrow = if self.show_weights {
|
||||
let line = if self.show_weights {
|
||||
let label = if *count == 1 {
|
||||
r#"|"1 dep"|"#.to_string()
|
||||
"1 dep".to_string()
|
||||
} else {
|
||||
format!(r#"|"{count} deps"|"#)
|
||||
format!("{count} deps")
|
||||
};
|
||||
format!("--{label}")
|
||||
format!(" {source} -->|{label}| {target}")
|
||||
} else {
|
||||
"-->".to_string()
|
||||
format!(" {source} --> {target}")
|
||||
};
|
||||
lines.push(format!(" {source} {arrow} {target}"));
|
||||
lines.push(line);
|
||||
}
|
||||
|
||||
lines.join("\n")
|
||||
|
||||
Reference in New Issue
Block a user