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

Support for static function calls #25

Closed fregante closed 9 years ago

fregante commented 9 years ago

Currently calls to FOO::bar() don't work anywhere:

SyntaxError: Unexpected token :

Examples:

a(href=URL::to_asset('a'))
= URL::to_asset('a')

I found an ugly workaround for the first one but unfortunately no workaround for the second one:

a(href!="<?php echo URL::to_asset('a') ?>")
fregante commented 9 years ago

I found a partial workaround for the second one, but it requires a wrapper element

.wrapper.
    <?php echo URL::to_asset('a') ?>
fregante commented 9 years ago

Oooohh amazing. This works:

a(href=URL.to_asset('a'))
= URL.to_asset('a')