Skip to content

Fix for #357/#297 including tests - #358

Open
tunnela wants to merge 3 commits into
zordius:masterfrom
tunnela:master
Open

tunnela wants to merge 3 commits into
zordius:masterfrom
tunnela:master

Conversation

@tunnela

@tunnela tunnela commented Nov 4, 2021

Copy link
Copy Markdown

No description provided.

@tunnela

tunnela commented Nov 4, 2021

Copy link
Copy Markdown
Author

Fixes at least #357, #281 and #295

@tunnela

tunnela commented Nov 4, 2021

Copy link
Copy Markdown
Author

@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
Copy Markdown

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

@theodorejb

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
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