Am 21.11.2013 15:53, schrieb Manu Evans:
It seems I can't use '-' blocks beneath ':' blocks, for instance:
:javascript var x = 0; - #{ "var y = " ~ d_variable ~ ";" } var arr = [ - foreach(x; things) #{ x ~ "," } ];
You get the idea... these don't seem to be getting executed, they're just pasted verbatim into the javascript.
Is there a better approach?
Currently the only way that will work is to use a normal script node and
'|' for the text:
script(type="text/javascript")
|var x = 0
|var y = #{d_variable};
|var arr = [
- foreach(x; things)
| #{x},
|];
The issue with :filters is that runtime and compile time processing get
mixed up when D code gets inserted due to the way they are currently
implemented. That should be improved, but the priority for that so far
is quite low compared to other features/bugs.