phug-php / phug

Phug - The Pug Template Engine for PHP
https://phug.selfbuild.fr
MIT License
63 stars 3 forks source link

Consecutive interpolation results in wrong output #65

Closed char101 closed 4 years ago

char101 commented 4 years ago

Hello,

I encountered an issue with the following code:

- $a = 10
- $b = 11
| (#{$a}#{$a != $b ? ' - '.$b : ''})

I expected to get:

(10 - 11)

But I actually get:

(10< - 11>)</ - 11>

Thanks!

kylekatarnls commented 4 years ago

This is a bug, meanwhile you may check https://github.com/phug-php/phug/issues/64#issuecomment-610240466

kylekatarnls commented 4 years ago

Consecutive interpolation has been fixed, now this code output exactly what you expect. It will be fixed in the next release, but you can yet test it with "phug/phug": "dev-master"

kylekatarnls commented 4 years ago

1.7.1 released with this fixed.