Skip to content
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

[Perl] Small whitespace related improvements #1644

Merged
merged 3 commits into from
Jul 9, 2018

Conversation

deathaxe
Copy link
Collaborator

This PR applies a change inspired by @keith-hall to avoid possibly breaking the break variable if it is used in extended regex patterns. It includes surrounding the :: by tabs as well.

The second commit turns an (?x) into an (?x: ... as the latter one was used in another context the same way like.

The accessor `::` may be surrounded by spaces and tabs. Not sure whether
someone makes use of tabs in such situations, but it should not fail if
one decides to do so.

HEREDOC indention still accepts normal spaces only at the moment as the
amount of spaces in front of the starting and terminating keyword must be
the same which might be tricky to handle if mixed indention is used.
Inspired by PR sublimehq#1640 this commit removes the isolated (?x) from
the `pragma` context.

Even though no related issues were found this style of flag is used
in the `functions` context already. So this change ensures the same
coding style to be used in both contexts.
@wbond
Copy link
Member

wbond commented Jul 9, 2018

Could we add a test for this?

@deathaxe
Copy link
Collaborator Author

deathaxe commented Jul 9, 2018

Basically there are already some tests about accessors surrounded by whitespace, but a second look revealed some pragma keywords like warnings :: register did not yet support that.

@wbond wbond merged commit 289782f into sublimehq:master Jul 9, 2018
@wbond
Copy link
Member

wbond commented Jul 9, 2018

Thanks!

charlievieth pushed a commit to charlievieth/Packages that referenced this pull request Jul 25, 2018
* [Perl] Allow any kind of whitespace around accessors

The accessor `::` may be surrounded by spaces and tabs. Not sure whether
someone makes use of tabs in such situations, but it should not fail if
one decides to do so.

HEREDOC indention still accepts normal spaces only at the moment as the
amount of spaces in front of the starting and terminating keyword must be
the same which might be tricky to handle if mixed indention is used.

* [Perl] Remove an isolated regexp flag

Inspired by PR sublimehq#1640 this commit removes the isolated (?x) from
the `pragma` context.

Even though no related issues were found this style of flag is used
in the `functions` context already. So this change ensures the same
coding style to be used in both contexts.
@deathaxe deathaxe deleted the pr/perl2 branch August 15, 2018 19:18
deathaxe added a commit to deathaxe/sublime-packages that referenced this pull request Jun 9, 2019
* [Perl] Allow any kind of whitespace around accessors

The accessor `::` may be surrounded by spaces and tabs. Not sure whether
someone makes use of tabs in such situations, but it should not fail if
one decides to do so.

HEREDOC indention still accepts normal spaces only at the moment as the
amount of spaces in front of the starting and terminating keyword must be
the same which might be tricky to handle if mixed indention is used.

* [Perl] Remove an isolated regexp flag

Inspired by PR sublimehq#1640 this commit removes the isolated (?x) from
the `pragma` context.

Even though no related issues were found this style of flag is used
in the `functions` context already. So this change ensures the same
coding style to be used in both contexts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants