Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve regex to match __FILE__ and __DIR__ magic constants#5465

Merged
schlessera merged 2 commits into
wp-cli:masterwp-cli/wp-cli:masterfrom
janw-me:masterjanw-me/wp-cli:masterCopy head branch name to clipboard
Nov 5, 2020
Merged

Improve regex to match __FILE__ and __DIR__ magic constants#5465
schlessera merged 2 commits into
wp-cli:masterwp-cli/wp-cli:masterfrom
janw-me:masterjanw-me/wp-cli:masterCopy head branch name to clipboard

Conversation

@janw-me

@janw-me janw-me commented Nov 4, 2020

Copy link
Copy Markdown
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.

Fixes wp-cli/extension-command#247

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.
@schlessera schlessera added the bug label Nov 4, 2020
@schlessera schlessera changed the title Pattern now only checks the quotes characters on the same line. Improve regex to match __FILE__ and __DIR__ magic constants Nov 4, 2020
@schlessera schlessera added this to the 2.5.0 milestone Nov 5, 2020
@schlessera schlessera merged commit fea0a96 into wp-cli:master Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin and theme commands break on custom folder structures

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.