-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inverted Sections #6
Comments
Thanks for reporting this. I actually didn't know this feature existed! |
Just pushed some initial code that should support most cases, though I still need to add support for zero-length arrays or slices. |
Hoisie thanks for add it so fast. But I get: Note that 'use-email' has 'true' as value: |
Ugh, this is probably related to the change in strings.Split |
Sorry! The problem was because I re-compiled Go and goinstalled mustache but I didn't update it, so I could not use the inverted section. Anyway, with the last change in strings.Split(), there would change the '0' to '-1'. http://groups.google.com/group/golang-nuts/browse_thread/thread/efc6eca11122105e/c36738bc8339ba0b |
I'm testing it and the code inner of the inverted section is always rendered, when I've passed a key to "false", "" (empty), and without the key. "While sections can be used to render text one or more times based on the value of the key, inverted sections may render text once based on the inverse value of the key. That is, they will be rendered if the key doesn't exist, is false, or is an empty list." |
Ah, I ran into the issue you were having. It should be fixed now. Care to test again? |
Hi! There is a useful section that has not been implemented. The Inverted Sections which begins with a caret (hat) and ends with a slash.
http://mustache.github.com/mustache.5.html
The text was updated successfully, but these errors were encountered: