From 709cfcc27e451da58f3ed5e2afc1e16779ea912d Mon Sep 17 00:00:00 2001 From: Johanan Idicula Date: Sun, 31 Jan 2021 12:19:46 -0500 Subject: [PATCH] Add caveat about expression syntax For if conditionals, expressions must be explicitly marked for evaluation if they contain any operators. Resolves github/docs#3001 --- data/reusables/github-actions/expression-syntax-if.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/github-actions/expression-syntax-if.md b/data/reusables/github-actions/expression-syntax-if.md index 69549fd112ee..70a79eb94fd0 100644 --- a/data/reusables/github-actions/expression-syntax-if.md +++ b/data/reusables/github-actions/expression-syntax-if.md @@ -1 +1 @@ -When you use expressions in an `if` conditional, you may omit the expression syntax ({% raw %}`${{ }}`{% endraw %}) because {% data variables.product.prodname_dotcom %} automatically evaluates the `if` conditional as an expression. +When you use expressions in an `if` conditional, you may omit the expression syntax ({% raw %}`${{ }}`{% endraw %}) because {% data variables.product.prodname_dotcom %} automatically evaluates the `if` conditional as an expression, unless the expression contains any operators. If the expression contains any operators, the expression must be contained within {% raw %}`${{ }}`{% endraw %} to explicitly mark it for evaluation.