-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
Hi,
maybe I'm doing something wrong but if I try to compile this
each related in ['a', 'b']
img(class="bottle_"+related+".jpg", src="bottle_"+related+".jpg")
I get
<?php
if (array(
'a',
'b'
)):
foreach (array(
'a',
'b'
) as $related):
$■['related'] = $related;
?><img src="bottle_"+related+".jpg"<?php
attr_class(add("bottle_", $related, ".jpg"));
?>/><?php
endforeach;
endif;
?>
As you can see class and srcare compiled with different values ...
Right now I use an ugly workaround declaring variable for every concatenation I need eg. - var bottle="bottle_"+related+".jgp"but this is way far from ideal
Is it a bug or am I missing something?
Reactions are currently unavailable