From 5d84a9af6123d79c59a8b00b7ef46b20d91a0dd8 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sat, 26 Aug 2023 15:57:24 -0700 Subject: [PATCH] clean up some cr/lf code --- lib/Perl/Tidy.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 413c9aa1..1f3a40dc 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -1783,17 +1783,17 @@ sub set_line_separator { my $test = $1; # dos - if ( $test =~ /^($CRLF)+$/ ) { + if ( $test =~ /^($CRLF)+\z/ ) { $input_line_separator = $CRLF; } # mac - elsif ( $test =~ /^($CR)+$/ && $test !~ /$LF/ ) { + elsif ( $test =~ /^($CR)+\z/ ) { $input_line_separator = $CR; } # unix - elsif ( $test =~ /^($LF)+$/ && $test !~ /$CR/ ) { + elsif ( $test =~ /^($LF)+\z/ ) { $input_line_separator = $LF; } -- 2.39.5