From f252986f1efbb8a8667e304640903ef5206e8b26 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 11 Jan 2021 22:57:01 +0100 Subject: fix duplicate removal --- bin/umlauf-to-dot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/umlauf-to-dot b/bin/umlauf-to-dot index 47a766c..081380a 100755 --- a/bin/umlauf-to-dot +++ b/bin/umlauf-to-dot @@ -125,9 +125,11 @@ push( @cycle_ids, keys %{ $map->{$line}{cycle} // {} } ); say "digraph Umlauf {"; +my @all_lines; for my $cycle_id (@cycle_ids) { - say join( "\n", uniq build_cycle( $line, $cycle_id ) ); + push( @all_lines, build_cycle( $line, $cycle_id ) ); } +say join( "\n", uniq @all_lines ); printf( "%s [style=bold];\n", format_train( $line, $map->{$line} ) ); -- cgit v1.2.3