From: Steve Hancock Date: Mon, 28 Aug 2023 20:46:55 +0000 (-0700) Subject: update docs X-Git-Tag: 20230701.04~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=43364514806920ecfbcb3635a74ea49e6f830c27;p=perltidy.git update docs --- diff --git a/CHANGES.md b/CHANGES.md index 2ce1bc6b..14c53e75 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,6 +16,23 @@ to limit tidy operations to a limited line range. Line numbers start with 1. The man pages have details. + - Some fairly rare instances of incorrect spacing have been fixed. The + problem was that the tokenizer being overly conservative in marking + terms as possible filehandles. This cause the space after the possible + filehandle to be frozen to its input value in order not to introduce + an error in case Perl had to guess. The problem was fixed by having the + tokenizer look ahead for operators which can eliminate the uncertainty. + To illustrate, in the following line the term ``$d`` was previouly + marked as a possible file handle, so no space was added after it. + + print $d== 1 ? " [ON]\n" : $d ? " [$d]\n" : "\n"; + + In the current version, the next token is seen to be an equality, so + ``$d`` is marked as an ordinary identifier and normal spacing rules + can apply: + + print $d == 1 ? " [ON]\n" : $d ? " [$d]\n" : "\n"; + - This version runs 7 to 10 percent faster than the previous release on large files, depending on options and file type.