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

Conditional phrases #52

Open
jaidevd opened this issue Mar 24, 2020 · 0 comments
Open

Conditional phrases #52

jaidevd opened this issue Mar 24, 2020 · 0 comments

Comments

@jaidevd
Copy link
Member

jaidevd commented Mar 24, 2020

In the variable settings modal, find a way to support simple if-else logic. Consider the following sentences:

A randomly generated number is positive.
A randomly generated number is negative.

This should be templatized as:

{% import random %}
{% set n = random.choice([-1, 1]) * random.random() %}
A randomly generated number is {% if n > 0 %}positive{% else %}negative{% end %}.
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