Skip to content

update regex to catch all theme names#72

Merged
therouv merged 1 commit into
semaio:mainfrom
Morgy93:update-regex
Sep 29, 2023
Merged

update regex to catch all theme names#72
therouv merged 1 commit into
semaio:mainfrom
Morgy93:update-regex

Conversation

@Morgy93
Copy link
Copy Markdown
Contributor

@Morgy93 Morgy93 commented Sep 29, 2023

  • Pull request is based against main branch
  • README.md reflects changes (if applicable)
  • New files contain a license header

Issue

The given regex: /\%theme\((?)([a-zA-Z0-9\/\_]{1,})\)\%/ does not catch - in the theme name.
For example: %theme(frontend/Vendor/my-theme)%

Proposed changes

The new regex: /\%theme\(([^)]+)\)\%/ caches everything between ( and ):

image by regex101.com

@therouv therouv merged commit c4933fd into semaio:main Sep 29, 2023
@therouv
Copy link
Copy Markdown
Contributor

therouv commented Sep 29, 2023

@Morgy93 Thanks!

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