Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle PHP expressions properly #5

Closed
kylekatarnls opened this issue Jun 25, 2016 · 0 comments
Closed

Handle PHP expressions properly #5

kylekatarnls opened this issue Jun 25, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@kylekatarnls
Copy link
Member

kylekatarnls commented Jun 25, 2016

The following pug code:

p(answear=substr("foo-bar", strlen("foo") + 1))

Turns into the following PHP (simplified):

<p answear="<?php echo substr("foo-bar", strlen("foo")); ?>"></p>

The + 1 is missing, we expect:

<p answear="<?php echo substr("foo-bar", strlen("foo") + 1); ?>"></p>

It's most likely caused by a bad handling of parentheses in CodeHandler::parseBetweenSeparators().

@kylekatarnls kylekatarnls added this to the 1.11 milestone Jun 25, 2016
@kylekatarnls kylekatarnls self-assigned this Jun 25, 2016
kylekatarnls added a commit that referenced this issue Jun 27, 2016
* Expressions in attributes
* Fix parentheses ending
* Fix attributes escaping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant