]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix a few additional [_A-Za-z] matches
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 22 Mar 2020 18:12:57 +0000 (11:12 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 22 Mar 2020 18:12:57 +0000 (11:12 -0700)
lib/Perl/Tidy/Tokenizer.pm

index b69e776ffff50cbdc5444d20dd9c7dc5821a6ed3..40f7012347ddefeec73eb43ee0a9582884245c54 100644 (file)
@@ -2273,7 +2273,8 @@ sub prepare_for_a_new_file {
                 # because we also have to be sure that previous token is
                 # a type character ($,@,%).
                 if ( $last_nonblank_token eq '{'
-                    && ( $next_tok =~ /^[A-Za-z_]/ ) )
+                    && ( $next_tok !~ /^\d/ ) 
+                    && ( $next_tok =~ /^\w/ ) )
                 {
 
                     if ( $next_tok eq 'W' ) {
@@ -4279,7 +4280,7 @@ sub operator_expected {
     if ( $last_nonblank_type eq 'Z' ) {
 
         # angle.t
-        if ( $last_nonblank_token =~ /^[A-Za-z_]/ ) {
+        if ( $last_nonblank_token =~ /^\w/ ) {
             $op_expected = UNKNOWN;
         }