Skip to content

Conversation

tunnela
Copy link

@tunnela tunnela commented Nov 4, 2021

No description provided.

@tunnela
Copy link
Author

tunnela commented Nov 4, 2021

Fixes at least #357, #281 and #295

@tunnela
Copy link
Author

tunnela commented Nov 4, 2021

@zordius Not sure if this is the best possible fix to above issues, but it should prevent Parser from thinking that a "(" character inside quotes starts a new subexpression.

@tunnela tunnela changed the title Fix for #357 including test Fix for #357/#297 including tests Nov 8, 2021
theodorejb added a commit to devtheorem/php-handlebars that referenced this pull request Jan 2, 2025
@theodorejb
Copy link

This still doesn't seem to correctly handle templates like {{test 'foo bar' (toRegex '^(foo|bar|baz)')}} (from #281 (comment)).

@theodorejb
Copy link

I found the issue - the $quotes = preg_match... regex is incorrect which prevents parsing certain single-quoted string arguments. I have fixed this in the latest release of https://github.com/devtheorem/php-handlebars.

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