diff --git a/lib/liquid/tags/assign.rb b/lib/liquid/tags/assign.rb index 70283178..4743ab0b 100644 --- a/lib/liquid/tags/assign.rb +++ b/lib/liquid/tags/assign.rb @@ -9,6 +9,10 @@ module Liquid # Creates a new variable. # @liquid_description # You can create variables of any [basic type](/docs/api/liquid/basics#types), [object](/docs/api/liquid/objects), or object property. + # + # > Caution: + # > Predefined Liquid objects can be overridden by variables with the same name. + # > To make sure that you can access all Liquid objects, make sure that your variable name doesn't match a predefined object's name. # @liquid_syntax # {% assign variable_name = value %} # @liquid_syntax_keyword variable_name The name of the variable being created. diff --git a/lib/liquid/tags/capture.rb b/lib/liquid/tags/capture.rb index 59aa62e7..1ec959fb 100644 --- a/lib/liquid/tags/capture.rb +++ b/lib/liquid/tags/capture.rb @@ -9,6 +9,10 @@ module Liquid # Creates a new variable with a string value. # @liquid_description # You can create complex strings with Liquid logic and variables. + # + # > Caution: + # > Predefined Liquid objects can be overridden by variables with the same name. + # > To make sure that you can access all Liquid objects, make sure that your variable name doesn't match a predefined object's name. # @liquid_syntax # {% capture variable %} # value diff --git a/lib/liquid/tags/decrement.rb b/lib/liquid/tags/decrement.rb index 49d43bc6..8dc62074 100644 --- a/lib/liquid/tags/decrement.rb +++ b/lib/liquid/tags/decrement.rb @@ -7,6 +7,10 @@ module Liquid # @liquid_name decrement # @liquid_summary # Creates a new variable, with a default value of -1, that's decreased by 1 with each subsequent call. + # + # > Caution: + # > Predefined Liquid objects can be overridden by variables with the same name. + # > To make sure that you can access all Liquid objects, make sure that your variable name doesn't match a predefined object's name. # @liquid_description # Variables that are declared with `decrement` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates), # or [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across diff --git a/lib/liquid/tags/increment.rb b/lib/liquid/tags/increment.rb index 3b6c16f5..0e00e970 100644 --- a/lib/liquid/tags/increment.rb +++ b/lib/liquid/tags/increment.rb @@ -7,6 +7,10 @@ module Liquid # @liquid_name increment # @liquid_summary # Creates a new variable, with a default value of 0, that's increased by 1 with each subsequent call. + # + # > Caution: + # > Predefined Liquid objects can be overridden by variables with the same name. + # > To make sure that you can access all Liquid objects, make sure that your variable name doesn't match a predefined object's name. # @liquid_description # Variables that are declared with `increment` are unique to the [layout](/themes/architecture/layouts), [template](/themes/architecture/templates), # or [section](/themes/architecture/sections) file that they're created in. However, the variable is shared across