We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a mustache template where I would like to surround the variables with {}
var output = Mustache.render('<td>{{{start.lat}}, {{start.lon}}}</td>', routeObj);
I'd like this to output a <td> with the string: {1.8978, 30.4545}
<td>
{1.8978, 30.4545}
{{{ has special meaning in mustache so it doesn't work. Is there a way to escape the first { in mustache?
The text was updated successfully, but these errors were encountered:
Two ways I can think of:
temporarily set delimiter to something besides braces, then switch it back after printing the braces
var output = Mustache.render('<td>{{=<% %>=}}{<% start.lat %>, <% start.lon %>}<%={{ }}=%></td>', routeObj);
use variables to print { and }
routeObj.openbrace = '{'; routeObj.closebrace = '}'; var output = Mustache.render('<td>{{openbrace}}{{start.lat}}, {{start.lon}}{{closebrace}}</td>', routeObj);
Sorry, something went wrong.
What @alanhamlett said, also, html entities: { is {
{
{
this all works. thanks!
No branches or pull requests
I have a mustache template where I would like to surround the variables with {}
I'd like this to output a
<td>
with the string:{1.8978, 30.4545}
{{{ has special meaning in mustache so it doesn't work. Is there a way to escape the first { in mustache?
The text was updated successfully, but these errors were encountered: