pug-php / pug

Pug template engine for PHP
https://www.phug-lang.com
MIT License
391 stars 42 forks source link

syntax error, unexpected 'idx' (T_STRING), expecting ';' #222

Closed sandrodz closed 5 years ago

sandrodz commented 5 years ago

Hello,

I encountered an issue with the following code:

      - for (let idx = 0; idx < 5; idx++)
        div(
          class="BackLines-line"
          class= (excludedLines[idx] === false) ? "bg-t" : "bg-t05"
          class= (idx > 2) ? "d-n d-b@s" : "")

But I actually get:

Screen Shot 2019-06-23 at 12 22 58 AM

Problem seems to be let with var it works fine.

Thanks!

kylekatarnls commented 5 years ago

Hi, I fixed it in the last version of js-phpize, please run composer update to get the bug fixed.