Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Support for changing or escaping delimiters #30

Open
davemerrill opened this issue Apr 6, 2016 · 2 comments
Open

Support for changing or escaping delimiters #30

davemerrill opened this issue Apr 6, 2016 · 2 comments

Comments

@davemerrill
Copy link

Wondering how to handle the (unlikely but possible) case where {{ or }} is needed in a template.

As I understand it, Mustache supports this syntax to change delimiters before compiling:

Mustache.tags = ["[[", "]]"];

It also supports changing delimiters on the fly like this:

{{=<% %>=}}

Far as I can see, neither of those variants are supported by MustacheCFC. Am I right about that? If so, could they be, or are there other alternatives?

@dswitzer
Copy link
Collaborator

dswitzer commented Apr 6, 2016

The way the current parser works it relies on regex parser to find tokens that need processing. Adding support for custom delimiters could probably be done w/out too much work, but allowing for templates to set the delimiters might be more problematic.

I'd certainly have no objects to someone submitting a pull request to add the functionality.

@davemerrill
Copy link
Author

Thanks Dan, all what I guessed. Don't have an immediate need for this now, just exploring what would be required if someone asks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants