Comments (5)
Actually, it should just be printing nothing when it encounters that tag. I will look into this.
from mu.
Would it make sense to not touch the {{}} if the view doesn't define the tag for it?
e.g.
- Hello {{foo}}, test {{bar}}
- {foo:'world'}
... would produce: Hello world, test {{bar}}
maybe this behavior could be configured.
from mu.
Mustache tags are suppose to render blank if their value is not defined. I
would be open to having a way to override this behavior, but the default
needs to be in line with the Mustache spec as to not be a surprise. It
would also be cool to be able to configure it to throw errors on missing
tags, mainly for development purposes.
On Thu, Jan 10, 2013 at 4:49 PM, Thomas Amsler [email protected]:
Would it make sense to not touch the {{}} if the view doesn't define the
tag for it?e.g.
- Hello {{foo}}, test {{bar}}
- {foo:'world'}
... would produce: Hello world, test {{bar}}
maybe this behavior could be configured.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-12126921.
from mu.
As a default it make sense. The specific use-case that I have is:
I need to template an HTML file that uses Mustache tags for two purposes:
- AngularJS bindings. These should not be touched by the MU process.
- Mustache tags that need to be processed for server side data pre-rendering.
A way to overwrite the default behavior would be greatly appreciated.
from mu.
adding my .02, would be great to have an event that notifies you of missed tags.
from mu.
Related Issues (20)
- How to output error code instead of missing partial? HOT 1
- Deprecated method: util.pump in new version of node
- Rendered data doesn't write correctly to HTTP stream. HOT 1
- Integration with express HOT 4
- Get Templates HOT 1
- Partials with relative path not implemented HOT 1
- "Error" event not being sent;
- Default file extension
- Memory leak due to infinite loop in recursive partials. HOT 1
- Silent failure when a template file does not exist
- feature request: custom delimiter HOT 1
- integrate with express? HOT 1
- partials with mu-cli.js HOT 4
- .write( string, encoding, offset, length is deprecated notice HOT 5
- No lambda support
- Write output to file HOT 1
- feature request: expose render context
- Is this repo dead? HOT 1
- External local stylesheets not loading
- Breaks on node 12, TypeError: util.puts is not a function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mu.