From 87d7dd0d37e59cb4f1a2d85ec3292f7a3efa60b4 Mon Sep 17 00:00:00 2001 From: sschuldenzucker Date: Sat, 28 Nov 2020 19:30:28 +0100 Subject: [PATCH] docs for the lenientIf option --- docs/source/tutorials/options.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/tutorials/options.md b/docs/source/tutorials/options.md index 3b22523f1..50ca213af 100644 --- a/docs/source/tutorials/options.md +++ b/docs/source/tutorials/options.md @@ -67,7 +67,7 @@ Before 2.0.1, extname is set to `.liquid` by default. To change tha ## jsTruthy -**jsTruthy** is used to use standard Javascript truthiness rather than the Shopify. +**jsTruthy** is used to use standard Javascript truthiness rather than the Shopify. it defaults to false. For example, when set to true, a blank string would evaluate to false with jsTruthy. With Shopify's truthiness, a blank string is true. @@ -89,6 +89,8 @@ it defaults to false. For example, when set to true, a blank string would evalu **strictVariables** is used to assert variable existence. If set to `false`, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause a render exception. Defaults to `false`. +**lenientIf** modifies the behavior of `strictVariables` to allow handling optional variables. If set to `true`, an undefined variable will *not* cause an exception in the following two situations: a) it is the condition to an `if` or `elsif` tag; b) it occurs right before a `default` filter. Irrelevant if `strictVariables` is not set. Defaults to `false`. + {% note info Non-existent Tags %} Non-existent tags always throw errors during pasrsing and this behaviour can not be customized. {% endnote %}