]> git.donarmstrong.com Git - perltidy.git/commitdiff
update comments
authorSteve Hancock <perltidy@users.sourceforge.net>
Wed, 22 Apr 2020 02:16:01 +0000 (19:16 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Wed, 22 Apr 2020 02:16:01 +0000 (19:16 -0700)
bin/perltidy
lib/Perl/Tidy/Formatter.pm

index b0b09ef2c6a9da7281e91d3b554365abcdcf1116..94b02dfb152cbd053beac4f7692ffb060ddc9507 100755 (executable)
@@ -1173,7 +1173,7 @@ This can be controlled with the value of B<n> as follows:
     -sbq=1 means follow the example of the source code
     -sbq=2 means always put a space between the backslash and quote
 
-The default is B<-sbq=1>, meaning that a space will be used 0if there is one in the source code.
+The default is B<-sbq=1>, meaning that a space will be used if there is one in the source code.
 
 =item Trimming trailing whitespace from lines of POD
 
index b19a4d295fb6cfa2d9c343bd92a0a52f5796d748..af5c455fccb79209865534da83dda7733be1d5ce 100644 (file)
@@ -2359,9 +2359,6 @@ sub respace_tokens {
     # This will be needed if we want to undo them for iterations
     my $rK_phantom_semicolons = [];
 
-    # Temporary hashes for adding semicolons
-    ##my $rKfirst_new               = {};
-
     # a sub to link preceding nodes forward to a new node type
     my $link_back = sub {
         my ( $Ktop, $key ) = @_;
@@ -7372,9 +7369,12 @@ sub copy_token_as_type {
         ############################
 
         #######################################################
-        # FIXME: Some older coding was simplfied by adding a couple
-        # of extra blanks to the end of the line to make $j+2 references
-        # valid.  This should eventually be unnecessary and removed.
+        # NOTE: Some coding has been simplfied by adding a couple of extra
+        # blanks to the end of the line to make $j+2 references valid.  This
+        # simplifies looking for the next nonblank token.
+        # * One place where this assumption is used is below in the calculation
+        # involving $j_next.
+        # * Another place is in sub 'starting_one_line_block'
         my $rnew_blank =
           copy_token_as_type( $rinput_token_array->[$jmax], 'b' );
         push @{$rinput_token_array}, $rnew_blank;
@@ -8407,6 +8407,8 @@ sub starting_one_line_block {
         {
 
             # be sure any trailing comment also fits on the line
+            # NOTE: the indexing here assumes that the rtoken_array has been
+            # padded with two trailing blanks
             my $i_nonblank =
               ( $rtoken_array->[ $i + 1 ]->[_TYPE_] eq 'b' ) ? $i + 2 : $i + 1;