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

jsExpressionToPhp erroneously applied to mixin arguments #15

Closed czert closed 9 years ago

czert commented 9 years ago

Hi,

mixin x(a, b)
    span

+x('', '+420')

gets transpiled to

...
<?php mixin__x(null, null, 'add(', ', 420)') ?>

For some reason, the transpiler gets confused into treating the portion ', '+420 as a javascript expression, while obviously it shouldn't, as the plus sign is a part of a string argument to the mixin.

czert commented 9 years ago

Resolved, closing the issue.