Subject: | -io keeping line width formatting for comments |
Hello,
The documentation for -io states:
"This flag is used to deactivate all formatting and line break changes within non-blank lines of code."
To me this says that all formatting will be ignored including length of line. That statement is true for code lines but currently not for comments. We've found that a tidy such as:
perltidy -io --freeze-blank-lines -i=4 -b -bext='/' sample.pm
On a file with:
sub foo {
# long comment ################################################################$
bar();
}
sub bar {
# short comment
foo();
}
Will produce:
sub foo {
# long comment ##################################################################################################################
bar();
}
sub bar {
# short comment
foo();
}
As opposed to:
sub foo {
# long comment ##################################################################################################################
bar();
}
sub bar {
# short comment
foo();
}
With long comment lines being moved to the left rather than being indented where they should be.
Long code lines are formatted as expected with the correct indentation.
Let me know if you have any questions.
Lyle