From ebafb0a3fe37883e146bfc827e40da2728f55d76 Mon Sep 17 00:00:00 2001 From: Jake Olney Date: Fri, 3 Jun 2022 17:53:18 -0700 Subject: [PATCH] changes from example feedback --- lib/liquid/standardfilters.rb | 7 +------ lib/liquid/tags/cycle.rb | 3 +++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/liquid/standardfilters.rb b/lib/liquid/standardfilters.rb index 9310a438..c5dbb033 100644 --- a/lib/liquid/standardfilters.rb +++ b/lib/liquid/standardfilters.rb @@ -180,8 +180,6 @@ module Liquid # @liquid_description # By default, the substring has a length of one character, and the array series has one array item. However, you can # provide a second parameter to specify the number of characters or array items. - # - # You can also supply a negative index which will count from the end of the string. # @liquid_syntax string | slice # @liquid_return [string] def slice(input, offset, length = nil) @@ -383,10 +381,7 @@ module Liquid # @liquid_summary # Filters an array to include only items with a specific property value. # @liquid_description - # You can use the `where` filter in the following ways: - # - # - Filter for items with a specific property value. This requires you to provide both the property name and the associated value. - # - Filter for items that have a `true` value for a boolean property. This requires only the property name. + # This requires you to provide both the property name and the associated value. # @liquid_syntax array | where: string, string # @liquid_return [array[untyped]] def where(input, property, target_value = nil) diff --git a/lib/liquid/tags/cycle.rb b/lib/liquid/tags/cycle.rb index 62ce6daa..3790d064 100644 --- a/lib/liquid/tags/cycle.rb +++ b/lib/liquid/tags/cycle.rb @@ -9,6 +9,9 @@ module Liquid # Loops through a group of strings and outputs them one at a time for each iteration of a [`for` loop](/api/liquid/tags#for). # @liquid_description # The `cycle` tag must be used inside a `for` loop. + # + # > Tip: + # > Use the `cycle` tag to output text in a predictable pattern. For example, to apply odd/even classes to rows in a table. # @liquid_syntax # {% cycle string, string, ... %} class Cycle < Tag