"Note: alphanumeric quote delimiter ($beginning_tok) \n");
}
- while ( $i < $max_token_index ) {
+ # Note: changed < to <= here to fix c109. Relying on extra end blanks.
+ while ( $i <= $max_token_index ) {
if ( $quote_pos == 0 || ( $i < 0 ) ) {
$tok = $rtokens->[ ++$i ];
$quoted_string .=
substr( $tok, $old_pos, $quote_pos - $old_pos - 1 );
+ # NOTE: any quote modifiers will be at the end of '$tok'. If we
+ # wanted to check them, this is the place to get them. But
+ # this quote form is rarely used in practice, so it isn't
+ # worthwhile.
+
$quote_depth--;
if ( $quote_depth == 0 ) {
=over 4
+=item B<Fix tokenization issue c109>
+
+Automated random testing produced an error tokenizing the following code
+fragment:
+
+ s s(..)(.)sss
+ ;
+
+This is equivalent to 's/(..)(.)//s' with 's' as the delimiter instead of '/'.
+It was tokenized correctly except when the final 's' was followed by a newline,
+as in the example. When the delimiter is a letter rather than a punctuation
+character, perltidy exercises some seldom-used code which had an off-by-one
+loop limit. This has been fixed.
+
+12 Nov 2021.
+
+
=item B<Fix tokenization of $$^, issue c106>
Automated random testing produced an error tokenizing the following fragment: