From 5cd8a83fa6ad844534e5071b6653b282038f16f8 Mon Sep 17 00:00:00 2001 From: liamgriffin Date: Fri, 6 Jan 2023 11:19:13 +0000 Subject: [PATCH 1/2] Adding more content to divided_by filter Adding more content to divided_by filter, by detailing the behaviour of how different results are generated by different types of divisors. --- lib/liquid/standardfilters.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/liquid/standardfilters.rb b/lib/liquid/standardfilters.rb index 8af5233c..6528f96d 100644 --- a/lib/liquid/standardfilters.rb +++ b/lib/liquid/standardfilters.rb @@ -757,7 +757,7 @@ module Liquid # @liquid_type filter # @liquid_category math # @liquid_summary - # Divides a number by a given number. + # Divides a number by a given number. The `divided_by` filter produces a result of the same type as the divisor. This means if you divide by an integer, the result will be an integer, and if you divide by a float, the result will be a float. # @liquid_syntax number | divided_by: number # @liquid_return [number] def divided_by(input, operand) From 936f803a4e0367c0c8a822ac983f95bde93c06ea Mon Sep 17 00:00:00 2001 From: liamgriffin Date: Fri, 6 Jan 2023 11:36:20 +0000 Subject: [PATCH 2/2] Removed trailing space --- lib/liquid/standardfilters.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/liquid/standardfilters.rb b/lib/liquid/standardfilters.rb index 6528f96d..7450a938 100644 --- a/lib/liquid/standardfilters.rb +++ b/lib/liquid/standardfilters.rb @@ -757,7 +757,7 @@ module Liquid # @liquid_type filter # @liquid_category math # @liquid_summary - # Divides a number by a given number. The `divided_by` filter produces a result of the same type as the divisor. This means if you divide by an integer, the result will be an integer, and if you divide by a float, the result will be a float. + # Divides a number by a given number. The `divided_by` filter produces a result of the same type as the divisor. This means if you divide by an integer, the result will be an integer, and if you divide by a float, the result will be a float. # @liquid_syntax number | divided_by: number # @liquid_return [number] def divided_by(input, operand)