Closed sl1m3d closed 11 years ago
Hi Rob.
There is, today, no way to write literals such as strings and numbers in the tag content.
I would consider a pull request with the greatest interest.
In the meantime, put your format in the data, as in https://gist.github.com/3803707.
Obsoleted by #54
The pull request #54 contains sample code that lets you render, for instance, the following template:
foo: {{ "foo" }}, FOO: {{ uppercase("foo") }}
as:
foo: foo, FOO: FOO
@psybert Check the sample code at https://github.com/groue/GRMustache/pull/54#issuecomment-21967544 : literals have finally found their solution.
Yea this looks awesome. Can't wait to try it out!
trying to do something like this: {{date_format(date,"yyyy-MM-dd 'at' HH:mm")}}
or
{{#equals(name,"fred")}}this guys name is short for fredrick! {{/}}
I see a path for the second scenario but that involves adding a @{@"fred" : @"fred"} to the context which seems silly.