Improve regex to match `__FILE__` and `__DIR__` magic constants by janw-me · Pull Request #5465 · wp-cli/wp-cli
Conversation
Copy link
Member
The previous didn't consider if there was only one quote character on a single line. It broke on the "// That's all, stop editing! Happy blogging." comment.
See https://regex101.com/r/9hXp5d/5 for the example.
See https://regex101.com/r/9hXp5d/7 for the fix in action.
The previous didn't consider if there was only one quote character on a single line. It broke on the "// That's all, stop editing! Happy blogging." comment. See https://regex101.com/r/9hXp5d/5 for the example. See https://regex101.com/r/9hXp5d/7 for the fix in action.
janw-me
requested a review
from a team
as a code owner
janw-me
mentioned this pull request
schlessera
added
the
bug
label
schlessera
changed the title
Pattern now only checks the quotes characters on the same line.
Improve regex to match __FILE__ and __DIR__ magic constants
schlessera approved these changes Nov 4, 2020
schlessera
added this to the
2.5.0 milestone
schlessera
merged commit
fea0a96
into
wp-cli:master
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment