]> git.donarmstrong.com Git - perltidy.git/commitdiff
Operator **= now has spaces on both sides by default (c349)
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 23 Mar 2024 19:32:24 +0000 (12:32 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 23 Mar 2024 19:32:24 +0000 (12:32 -0700)
CHANGES.md
lib/Perl/Tidy/Formatter.pm

index 945f92dbc20ce47c4e4a896af076cbaa815c30ad..4570348a52378265a6107043992eb81350550bab 100644 (file)
@@ -2,6 +2,11 @@
 
 ## 2024 02 02.02
 
+    - The operator ``**=`` now has spaces on both sides by default. Previously,
+      there was no space on the left.  This change makes its spacing the same
+      as all other assignment operators. The previous behavior can be obtained
+      with the parameter setting -nwls='**='.
+
     - The option --file-size-order, or -fso is now the default. When
       perltidy is given a list of multiple filenames to process, they
       are sorted by size and processed in order of increasing size.
index b36b0fbd39690df584f0a17dda6eaa8751fe4c6d..7353c06e927f850e76e1c027646a50c78e8ef030 100644 (file)
@@ -3010,7 +3010,7 @@ sub initialize_whitespace_hashes {
     my @spaces_both_sides = qw#
       + - * / % ? = . : x < > | & ^ .. << >> ** && .. || // => += -=
       .= %= x= &= |= ^= *= <> <= >= == =~ !~ /= != ... <<= >>= ~~ !~~
-      &&= ||= //= <=> A k f w F n C Y U G v P S
+      **= &&= ||= //= <=> A k f w F n C Y U G v P S
       #;
 
     my @spaces_left_side = qw<
@@ -3018,8 +3018,9 @@ sub initialize_whitespace_hashes {
     >;
     push( @spaces_left_side, '#' );    # avoids warning message
 
+    # c349: moved **= from @spaces_right_side to @spaces_both_sides
     my @spaces_right_side = qw<
-      ; } ) ] R J ++ -- **=
+      ; } ) ] R J ++ --
     >;
     push( @spaces_right_side, ',' );    # avoids warning message