Skip to content

Fix for Issue2173#2174

Merged
TomasVotruba merged 2 commits intorectorphp:masterfrom
dpesch:issue2173
Oct 17, 2019
Merged

Fix for Issue2173#2174
TomasVotruba merged 2 commits intorectorphp:masterfrom
dpesch:issue2173

Conversation

@dpesch
Copy link
Copy Markdown
Contributor

@dpesch dpesch commented Oct 17, 2019

This patch fixes this issue. But I suspect that there will be more edge cases which will not be fixed with this small patch. Perhaps it will be better to assure, that the escaping will only executed on hyphen in character classes.

This test shows the false positive for `hyphen + shorthand` combination
outside a character class which should not be escaped.
This patch fixes this issue. But I suspect that there will be more edge
cases which will not be fixed with this small patch. Perhaps it will be
better to assure, that the escaping will only executed on hyphen in
character classes.
@TomasVotruba
Copy link
Copy Markdown
Member

Thank you for the fix.
If you come up with another edge case or better solution, feel free to send another PR

@TomasVotruba TomasVotruba merged commit 197efa1 into rectorphp:master Oct 17, 2019
@dpesch dpesch deleted the issue2173 branch October 17, 2019 10:20
TomasVotruba added a commit that referenced this pull request Apr 26, 2022
rectorphp/rector-src@ae45be1 [DX] Add note warning about using old config (#2174)
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