Comments (8)
That would be sick. One thing to keep in mind (and I'm about to open issues so everyone else knows) is that I want to support customizing the grammar.
You should be able to use any delimiters, like <%
and %>
instead of {{
and }}
, and you should be able to change what tag indicators mean, like #
is a comment instead of !
and <
starts a section while >
ends it.
ctemplate has similar support and it looks really fun.
from mustache.
hmmmm I will have to think about the best way to handle that. It would be no problem with macros but with peg you cant really support dynamic grammars (that i know of)
from mustache.
Just added #8 and #9. Sorry to make it hard :)
from mustache.
haha no worries. I agree with the delimiters, but as for changing the rest wouldnt that just make it harder for other people to read? I will see what I can do :D
from mustache.
You mentioned in #9 that doing anything dynamically is hard in the C implementation. Just wanted to point out that changing delimiters does happen dynamically. The reason is so you can use the same template with different views or in different apps without having to tweak your Ruby code (e.g. self.delimiters = ['{{', '}}']
or somesuch).
Does this throw a wrench in the C idea?
from mustache.
Not sure what you mean. You wanted to support '{{' and '<%', could we just support them both arbitrarily, without even having any kind of configuration?
from mustache.
Check the "Set Delimiter" documentation in http://github.com/defunkt/mustache/blob/delimiters/README.md - that might explain what I mean better.
from mustache.
I'm going to close this out for now. Please re-open or send a pull request when you're ready.
from mustache.
Related Issues (20)
- multi-line yaml input to mustache template outputs as JSO HOT 1
- Can i call a function from inside mustache templates which takes parameters ?
- Squared brackets not supported HOT 1
- Bogus standalone handling of partials ? HOT 1
- Multi-document YAML files are not processed correctly HOT 2
- Broken link in `README.md`
- Mustache Condition HOT 1
- Mustache list-rendering @index error HOT 1
- Example from man page does not work HOT 3
- Disable partials? HOT 11
- Accessing array last element in template
- [Example] Create Javascript like Mustache Helpers (Lambda) fn in ruby
- Define tags in command line ?
- Strange behavior on time strings
- Not able to read dotted field HOT 1
- Suggestion for new option: `./bin/mustache --extension EXT`
- Documentation link on RubyGems 404s
- mustache(5) manpage is vague about falsy values
- Cli integration raises HTML validation error HOT 1
- Naming of # symbol
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 mustache.