polarblau / meta_wordpress

Use your favorite meta languages such as Haml, Sass and Coffeescript to bootstrap and build Wordpress themes.
MIT License
9 stars 1 forks source link

Fix attributes containing php statements #16

Closed polarblau closed 11 years ago

polarblau commented 11 years ago

Haml seems to sort multiple arguments separated by spaces such as CSS classes if they are applied via short–cut as well as explicitly, which has unfortunate side effects:

.foo(class="#{ php("echo $type") }")
<div class='$type <?php ?> foo echo'></div>

:trollface:

Workaround:

%div(class="#{ php(echo "$type foo") }")
<div class='<?php echo "$type foo" ?>'>