SE7ENSKY / jade2php

Unlock Jade for PHP! Convert Jade templates into raw PHP templates. CLI tool and JavaScript API. Test covered.
43 stars 10 forks source link

Not expected parenthesis bug #31

Open OnkelTem opened 9 years ago

OnkelTem commented 9 years ago

This simple template:

div
  if tabs
    div
  != myvar

generates:

<div><?php if ($tabs) : ?><div></div><?php endif ?>(<?= $myvar ?>)</div>

— note the parenthesis around <?= $myvar ?>.

Changing it to either

div
  if tabs
    div
  div!= myvar

or

div
  if tabs
    div
  | 
  != myvar

(whitespace goes after |) — removes the parenthesis.

janwirth commented 9 years ago

Pull requests are welcome :)