We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi all,
Please close this issue if this is already possible - it doesn't seem to work currently
When using an if statement, an else block must be present
if
foo myarg: echo {{ if myarg != "" { "myarg is present" } else { "" } }}
Would it be possible to default to "" is an else block is omitted?
""
else
foo myarg: echo {{ if myarg != "" { "myarg is present" } }}
Thanks!
The text was updated successfully, but these errors were encountered:
I think this is probably reasonable. I don't really like defaulting to "", it just seems inelegant, but I don't see a better alternative.
Sorry, something went wrong.
I'm taking a look at this issue because it looks relatively simple to implement, where exactly is the implementation for conditionals?
It's in a few places, but you can start with Parser::parse_conditional, and make Expression::Conditional::otherwise an Option.
Parser::parse_conditional
Expression::Conditional::otherwise
Option
No branches or pull requests
Hi all,
Please close this issue if this is already possible - it doesn't seem to work currently
When using an
if
statement, an else block must be presentWould it be possible to default to
""
is anelse
block is omitted?Thanks!
The text was updated successfully, but these errors were encountered: