fenekku / moustachu

Mustache templating for Nim
65 stars 8 forks source link

add option to disable HTML escaping #9

Closed davidnorthetal closed 6 years ago

davidnorthetal commented 6 years ago

so it can be used for non-HTML things as well.

Thanks for consideration and great work!

fenekku commented 6 years ago

Hi David,

Would the triple curly braces work for what you had in mind? Right now, you can do:

let text = "{{{non-escaped}}}" 
var c = newContext()
c["non-escaped"] = "1 < 2 && blue is not red"
render(text, c)  # "1 < 2 && blue is not red"

hope this helps!