Giter Club home page Giter Club logo

Comments (8)

defunkt avatar defunkt commented on August 24, 2024

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.

tj avatar tj commented on August 24, 2024

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.

defunkt avatar defunkt commented on August 24, 2024

Just added #8 and #9. Sorry to make it hard :)

from mustache.

tj avatar tj commented on August 24, 2024

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.

defunkt avatar defunkt commented on August 24, 2024

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.

tj avatar tj commented on August 24, 2024

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.

defunkt avatar defunkt commented on August 24, 2024

Check the "Set Delimiter" documentation in http://github.com/defunkt/mustache/blob/delimiters/README.md - that might explain what I mean better.

from mustache.

defunkt avatar defunkt commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.