Skip to content
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

Support negative sections #9

Open
maghoff opened this issue Jan 10, 2017 · 1 comment
Open

Support negative sections #9

maghoff opened this issue Jan 10, 2017 · 1 comment

Comments

@maghoff
Copy link
Owner

maghoff commented Jan 10, 2017

Imagined syntax: {{^field}}...{{/field}}

Standard usecase: Render a list, but show something different when that list is empty.

Other imagined usecase: An Option can be iterated over for the Some(_) case, it makes sense to have this syntax work for the None case. Similarly for Result.

When using a Result in a negative section, maybe expose the Err(_) value as {{.}}?

@maghoff
Copy link
Owner Author

maghoff commented Jan 10, 2017

Maybe also support booleans with {{^bool?}}

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

No branches or pull requests

1 participant