- The option --delete-repeated-commas is now the default.
It makes the following checks and changes:
- - Repeated commas like ',,' on the same line are removed with a warning
- - Repeated fat commas like '=> =>' on the same line are removed with a
+ - Repeated commas like ',,' are removed with a warning
+ - Repeated fat commas like '=> =>' are removed with a
warning
- - Repeated commas and fat commas on different lines remain unchanged but
- produce a warning (to avoid promoting a side-comment to block comment)
- - The combination '=>,' produces a warning but is not changed (it is
- likely an error but only its author would know how to fix it).
- These warnings are only output if the --warning-output, -w flag is set.
+ - The combination '=>,' produces a warning but is not changed
+ These warnings are only output if --warning-output, or -w, is set.
This is now the DEFAULT Behavior.
- To avoid this change, use --nodelete-repeated-commas, or -ndrc.
+ Use --nodelete-repeated-commas, or -ndrc, to turn this option off.
- Added control --delete-interbracket-arrows, or -dia, to delete optional
hash ref and array ref arrows between brackets as in the following
$is_single_col = $jmax == 1;
}
- # Skip padding in a large table, or single column, where 'most'
- # of the signed values are shorter than the unsigned values.
- # The median is used to make this insensitive to small changes.
- if ( $median_unsigned_length >= $median_signed_length ) {
- if ( $is_single_col
- || $nlines > $rOpts_valign_signed_numbers_limit / 2 )
- {
- return;
- }
+ # Skip padding in a table where 'most' of the signed values are shorter
+ # than the unsigned values. Require at least 3 unsigned values for this
+ # test to reduce the influence of the min and max values
+ if ( $median_unsigned_length >= $median_signed_length && $unsigned > 2 ) {
+ return;
}
#--------------------------------------
@data = (
["1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th"],
- [ 1, 2, 5, 6, 3, 1.5, -1, -3, -4],
+ [ 1, 2, 5, 6, 3, 1.5, -1, -3, -4],
[-4, -3, 1, 1, -3, -1.5, -2, -1, 0],
- [ 9, 8, 9, 8.4, 7.1, 7.5, 8, 3, -3],
- [ 0.1, 0.2, 0.5, 0.4, 0.3, 0.5, 0.1, 0, 0.4],
+ [ 9, 8, 9, 8.4, 7.1, 7.5, 8, 3, -3],
+ [ 0.1, 0.2, 0.5, 0.4, 0.3, 0.5, 0.1, 0, 0.4],
);
$s->drawLine( 35, 0);
expect => <<'#3...........',
@data = (
["1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th"],
- [ 1, 2, 5, 6, 3, 1.5, -1, -3, -4],
+ [ 1, 2, 5, 6, 3, 1.5, -1, -3, -4],
[-4, -3, 1, 1, -3, -1.5, -2, -1, 0],
- [ 9, 8, 9, 8.4, 7.1, 7.5, 8, 3, -3],
- [ 0.1, 0.2, 0.5, 0.4, 0.3, 0.5, 0.1, 0, 0.4],
+ [ 9, 8, 9, 8.4, 7.1, 7.5, 8, 3, -3],
+ [ 0.1, 0.2, 0.5, 0.4, 0.3, 0.5, 0.1, 0, 0.4],
);
$s->drawLine( 35, 0);