You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
I have read and do not intend to re-open the trailing whitespace flamewars.
However, in PHP there is a very specific case where the difference between having a single trailing space, and not changes the output, and thus removing it is destructive to the script.
Steps to Reproduce
PHP file:
<?php
// ...
?>[trailing space here]
<sometag>
Output: <CR><sometag>
PHP file:
<?php
// ...
?>[no trailing space as it's been removed by default, thank you]
<sometag>
Output: <sometag>
Expected behavior:
The first space after a closing PHP tag is a language specific indicator. Thou shalt not touch it.
Actual behavior:
You remove the space by default, causing a CR to be missing in the output. This means PHP developers have no choice but to disable whitespace trimming altogether, otherwise by default Atom will damage PHP file output.
Reproduces how often:
100% as it's a PHP feature.
Versions
Additional Information
The reasons for it go back to the days of PHP3 apparently, and it's been kept that way ever since (for backwards compatibility i assume): http://marc.info/?t=90279165800002&r=1&w=2
It's not well documented.. I can't seem to even find an offical PHP docs page describing it, but it's readily proven: https://3v4l.org/HEjdr
The issue is that the default behavior of trimming them is destructive to PHP files. I'm not asking for whitespace trimming default settings to be changed at all. You guys decided that a long time ago, but I am asking that the default removal, not steal the first space after a PHP closing tag, for compatibility reasons.
Thank you for your time.
The text was updated successfully, but these errors were encountered:
Prerequisites
Description
I have read and do not intend to re-open the trailing whitespace flamewars.
However, in PHP there is a very specific case where the difference between having a single trailing space, and not changes the output, and thus removing it is destructive to the script.
Steps to Reproduce
Output:
<CR><sometag>
Output:
<sometag>
Expected behavior:
The first space after a closing PHP tag is a language specific indicator. Thou shalt not touch it.
Actual behavior:
You remove the space by default, causing a CR to be missing in the output. This means PHP developers have no choice but to disable whitespace trimming altogether, otherwise by default Atom will damage PHP file output.
Reproduces how often:
100% as it's a PHP feature.
Versions
Additional Information
The reasons for it go back to the days of PHP3 apparently, and it's been kept that way ever since (for backwards compatibility i assume):
http://marc.info/?t=90279165800002&r=1&w=2
It's not well documented.. I can't seem to even find an offical PHP docs page describing it, but it's readily proven:
https://3v4l.org/HEjdr
The issue is that the default behavior of trimming them is destructive to PHP files. I'm not asking for whitespace trimming default settings to be changed at all. You guys decided that a long time ago, but I am asking that the default removal, not steal the first space after a PHP closing tag, for compatibility reasons.
Thank you for your time.
The text was updated successfully, but these errors were encountered: