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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
test.mustache:
env: { {{#env}}{{#es6}}es6: true, {{/es6}}{{#jasmine}}jasmine: true, {{/jasmine}}{{/env}} }
I store this file locally and use const template = fs.readFileSync().toString() to get the template text.
const template = fs.readFileSync().toString()
view:
const view = { env: { es6: true, } } // or const view = { env: { es6: true, jasmine: true, } }
When I execute mustache.render(template, view), I got the following output:
mustache.render(template, view)
env: { es6: true, }
The indent of the end bracket is unexpectd.
expect:
env: { es6: true, } // or env: { es6: true, jasmine: true, }
However, if I insert a linebreak after the tag in test.mustache, just like the following:
test.mustache
then I got:
Now the indent of the bracket is right, but I got an extra empty line which is also unexpected.
I wonder why I got these result ? Is the way I read the .mustaache file wrong ?
.mustaache
Also may anybody provide a beautiful solution for this problem.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
test.mustache:
I store this file locally and use
const template = fs.readFileSync().toString()
to get the template text.view:
When I execute
mustache.render(template, view)
, I got the following output:The indent of the end bracket is unexpectd.
expect:
However, if I insert a linebreak after the tag in
test.mustache
, just like the following:then I got:
Now the indent of the bracket is right, but I got an extra empty line which is also unexpected.
I wonder why I got these result ? Is the way I read the
.mustaache
file wrong ?Also may anybody provide a beautiful solution for this problem.
The text was updated successfully, but these errors were encountered: