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

Support for implicity array and overriding encoding options #17

Merged
merged 3 commits into from Aug 22, 2012

Conversation

dswitzer
Copy link
Collaborator

I actually did this work a while back, but I'm just now getting back to this code. I've implemented a couple of patches I thought worthy of migrating back into the source:

  • Added basic support for implicit iterators (i.e. {{.}} for arrays.) This means you can now access an array using the following: {{#array}} array value: {{.}} {{/array}}
  • Separated the functions for encoding the {{ }} and {{{ }}} evaluated text. I did this so someone has the ability to overwrite the behavior of {{...}} and {{{...}}}. For our use case, we need to explicit handle how text is rendered based upon how it's being used in the code (we're using Mustache to give our users some templating processing abilities for e-mail generation.) So if we're rendering an HTML e-mail, we always want to html encode the text and likewise for text e-mails we always want to render the text as-is.

* Added unit tests for overrides & implicit iterators
…an process on the raw value (instead of the encoded value)
dswitzer added a commit that referenced this pull request Aug 22, 2012
Support for implicity array and overriding encoding options
@dswitzer dswitzer merged commit 6636c31 into rip747:master Aug 22, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant