tj/haml.js

string interpolation

Closed this issue · 6 comments

Is string interpolation planned?

The following worked in haml-js:

:javascript
  window.book = #{JSON.stringify(book)};

Now it outputs the following:

<script type="javascript">
//<![CDATA[
window.book = #{JSON.stringify(book)};
//]]></script>

The workaround for the moment is doing

!= "<script type='text/javascript' charset='utf-8'>window.book = " + JSON.stringify(book) + "</script>"
tj commented

im down

Any status on this? Would also be useful when using :markdown.

Oh! No! Interpolation doesn't work =(
Friends, please, do it, it so important.

tj commented

@the-teacher haml.js is somewhat defunct, it was effectively replaced by jade but I'd be open to adding someone as a maintainer

HAML de-facto is enterprise standart for many companies, which use ruby on rails. That why it's very important personaly for me - it's will be very easy to migrate to node.js projects.

For example - now I just beginner with node,js - And I try to find analogues of my ruby tools.

I hope, you will not forget about haml.js, it's very good template engine. But I will try to use Jade.

Thank you!