fix: correct mermaid flowchart edge label syntax (-->|label| not --|"label"|)
Some checks failed
CI / Check / Test (push) Failing after 1m40s
Architecture Docs / Generate diagrams (push) Successful in 3m51s

This commit is contained in:
2026-06-17 10:09:44 +02:00
parent b2ce4b4ee9
commit 134c46da43
2 changed files with 9 additions and 9 deletions

View File

@@ -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")