I know this is a very non-standard use case, but I am hooking on HAML, Markdown and Handlebars (in SproutCore 2.0), and I am 1 step away from the “beautiful” code. Blending HAML, Markdown, and Javascript is less ideal than it could be. If I wanted to add a post filter for all HAML output, replacing {{text}} with <script>{{text}}</script> , what would be the best way to do this?
I could just hack the post-build step after haml , but I would like to turn it into something that I can return to the SproutCore community.
I want to replace
%body javascript: {{handlebars}}
FROM
%body {{handlebars}}
Who would give me
<body> <script>{{handlebars}}</script> </body>
However, I also want this to work when it is embedded in markdowns. For example,
%body markdown:
Currently, the only way to get this is
%body markdown: # Hello, <script>{{handlebars}}</script>
Which product
<body> <h1>Hello, <script>{{handlebars}}</script></h1> </body>
markdown mustache haml
Zach riggle
source share