changes from example feedback

This commit is contained in:
Jake Olney
2022-06-27 15:10:22 -04:00
committed by Melanie Wang
parent 4ec9db3f99
commit ebafb0a3fe
2 changed files with 4 additions and 6 deletions
+1 -6
View File
@@ -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)
+3
View File
@@ -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