-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoTrailingWhitespaceFixer - trim space after opening tag #3957
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,44 @@ public function provideFixCases() | |
[ | ||
"<?php\necho <<<'EOT'\nInline Il y eut un \r\nrire éclatant \n \n \r\nEOT;\n\n", | ||
], | ||
[ | ||
"<?php\necho 'Hello World';", | ||
"<?php \necho 'Hello World';", | ||
], | ||
[ | ||
"<?php\n\necho 'Hello World';", | ||
"<?php \n\necho 'Hello World';", | ||
], | ||
[ | ||
"<?php\r\necho 'Hello World';", | ||
"<?php \r\necho 'Hello World';", | ||
], | ||
[ | ||
"<?php\necho 'Hello World';", | ||
"<?php \necho 'Hello World';", | ||
], | ||
[ | ||
"<?php\necho 'Hello World';", | ||
"<?php \necho 'Hello World';", | ||
], | ||
[ | ||
'<?php ', | ||
'<?php ', | ||
], | ||
[ | ||
"<?php\t", | ||
"<?php\t\t", | ||
], | ||
[ | ||
'<?php ', // do not trim this as "<?php" is not valid PHP | ||
], | ||
[ | ||
"<?php\n \n \n ", | ||
], | ||
[ | ||
"<?php\n \n ", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be a dumb question, but how is this not fixed into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name of the fixer is a little misleading, here is description:
So, the only non-blank line is the one with open tag. |
||
"<?php \n \n ", | ||
], | ||
]; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add this case;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SpacePossum added, I hope you mean 2nd one with fix (as the first set of spaces is in non-blank line).