Escaping Handlebars expressions for documentation


#1

Hey,

I need to document handlebars expressions and my the docs section is written in Ember too,

So, is there a way to escape handlebars expressions?

I tried backslashing such \\{

but then the output result is resulted with \\ too.

I can use & #125; but this makes my code super ugly.

Is there a way to write maybe a helper to read the template as a string before it’s being parsed? or other alternatives?

Thanks.


#2

One backslash will escape a mustache inside of a template:

\{{foo}}

will output the string

{{foo}}

Example: http://emberjs.jsbin.com/selof/1/edit


#3

Cool, I always tried two :blush: