diff --git a/tred_refactored/tredlib/TrEd/Stylesheet.pm b/tred_refactored/tredlib/TrEd/Stylesheet.pm index 968639995..66695a23b 100644 --- a/tred_refactored/tredlib/TrEd/Stylesheet.pm +++ b/tred_refactored/tredlib/TrEd/Stylesheet.pm @@ -377,7 +377,7 @@ sub get_stylesheet_patterns { $hint = $s->{hint}; $context = $s->{context}; $context = '.*' unless ( wantarray or $context =~ /\S/ ); - chomp $context; + chomp $context if length $context; @$patterns = defined( $s->{patterns} ) ? @{ $s->{patterns} } : (); } else { diff --git a/tred_refactored/tredlib/contrib/support/arrows.inc b/tred_refactored/tredlib/contrib/support/arrows.inc index 5766107de..5ac84b193 100644 --- a/tred_refactored/tredlib/contrib/support/arrows.inc +++ b/tred_refactored/tredlib/contrib/support/arrows.inc @@ -219,7 +219,7 @@ instruction in L). $dx ||= 0; $dy ||= 0; - if ( $node == $target ) { + if ( $node == ($target // -1) ) { # same node push @{ $props{-coords} }, <<"COORDS";