Improve previous fix
This commit is contained in:
parent
90ad7cfe45
commit
bf2aada26f
@ -85,10 +85,11 @@ fn recurse_export(
|
||||
out: &mut String,
|
||||
already_processed: &mut HashSet<String>,
|
||||
) {
|
||||
if already_processed.contains(&node.name) {
|
||||
let key = format!("{} #> {}", parent_name, node.name);
|
||||
if already_processed.contains(&key) {
|
||||
return;
|
||||
}
|
||||
already_processed.insert(node.name.to_string());
|
||||
already_processed.insert(key);
|
||||
|
||||
if !parent_name.is_empty() && matches!(node.r#type, NodeType::Object { .. }) {
|
||||
writeln!(out, "\"{}\" -> \"{}\";", parent_name, node.name).unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user