-
Notifications
You must be signed in to change notification settings - Fork 59.3k
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
Be more precise when expression syntax ${{ }} can be omitted in if statement #27497
Conversation
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@programmer04 Thanks so much for submitting a PR! I'll get this triaged for review ⚡ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @programmer04 for finding this and helping with the fix!
While I was searching around the other articles, I found some text on if
conditionals in the "Variables" article as well.
What do you think about updating this line with the same text?
Thanks for the review and suggestion @jc-clark! For this syntax, it's even a little bit more complicated, because you can also write such expressions as
|
576aa94
to
09eb9c9
Compare
🤔 I see what you're saying @programmer04. I think it would make sense to document the two examples you listed. I think the paragraph in the There's one problem though. We can't just add line breaks because the reusable also exists in a bulleted list on this line. Adding line breaks will break the formatting in the bulleted list. It seems to me that we can delete this bullet point in the note since the same information is at the top of the article. Then we'd be able to add some line breaks and more information to the reusable. What do you think of that? |
09eb9c9
to
3d9e294
Compare
👋 @programmer04 - just checking in. Is this one ready for another review? |
3d9e294
to
18bd007
Compare
Automatically generated comment ℹ️This comment is automatically generated and will be overwritten every time changes are committed to this branch. The table contains an overview of files in the Content directory changesYou may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.
fpt: Free, Pro, Team |
I made suggested adjustments, it's ready for review @jc-clark and @cmwilson21. Btw. it would be easier if GH would always require |
ac68dae
to
148445e
Compare
Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
148445e
to
ef4507f
Compare
Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
Looks great to me. Many thanks for helping keep this updated @programmer04. I'll get this set up to merge. |
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡ |
Why:
Unfortunately, you can't always omit
${{ }}
in theif
statement and it's not documented anywhere. Consider below examplesthe above works as expected, but the below that only differs by order of statements in
if
doesn't workends with
This is due to the YAML format see
basically, it can't start with
!
, because it has meaning in YAML specification.What's being changed (if available, include any code snippets, screenshots, or gifs):
The description for the
if
conditional.Check off the following:
I have reviewed my changes in staging, available via the View deployment link in this PR's timeline.
data
directory.For content changes, I have completed the self-review checklist.