php-gettext / Gettext

PHP library to collect and manipulate gettext (.po, .mo, .php, .json, etc)
MIT License
687 stars 134 forks source link

Trim tab characters from comment lines #215

Closed ocean90 closed 5 years ago

ocean90 commented 5 years ago

Related report: https://github.com/wp-cli/i18n-command/issues/169

When a PHP comment is indented with a tab character it currently doesn't get extracted. Adding the tab to the characters to strip will fix this.

swissspidy commented 5 years ago

Looks like this breaks Gettext\Tests\AssetsTest::testTwig twig/Po as the line numbers change. Haven't checked whether the assertions were actually wrong or if this is a regression.

ocean90 commented 5 years ago

@swissspidy Those are unrelated based on the build status of the master branch.

swissspidy commented 5 years ago

Ah yes, indeed! 👍

ocean90 commented 5 years ago

https://github.com/oscarotero/Gettext/pull/216 updates the incorrect line numbers.

oscarotero commented 5 years ago

Thanks 👍