defunkt / pystache

Mustache in Python
http://mustache.github.com/
MIT License
1.31k stars 308 forks source link

Is possible to keep unused variables? #184

Open 29antonioac opened 8 years ago

29antonioac commented 8 years ago

Hi! I'm using pystache from yesterday to create LaTeX tables with some results. It works very well but I have a doubt. Is there a posibility that the renderer keep the unused variables in the output instead of make it empty?

For example:

* {{tag1}}
* {{tag2}}
{ "tag1" : 2 }

Them produce this output

* 2
* 

It could be produce this output instead? In this case, how could I do that?

* 2
* {{tag2}}

Thank you!

iblancasa commented 8 years ago

It is easy! You only have to insert

{ "tag1" : 2,
"tag2" : "{{tag2}}"
}