mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Merge pull request #1595 from Shopify/jake-clarify-sort-natural
Clarify sort_natural and fix unless syntax
This commit is contained in:
@@ -358,7 +358,11 @@ module Liquid
|
||||
# @liquid_type filter
|
||||
# @liquid_category array
|
||||
# @liquid_summary
|
||||
# Sorts the items in an array in case-insensitive alphabetical, or numerical, order.
|
||||
# Sorts the items in an array in case-insensitive alphabetical order.
|
||||
# @liquid_description
|
||||
# > Caution:
|
||||
# > You shouldn't use the `sort_natural` filter to sort numerical values. When comparing items an array, each item is converted to a
|
||||
# > string, so sorting on numerical values can lead to unexpected results.
|
||||
# @liquid_syntax array | sort_natural
|
||||
# @liquid_return [array[untyped]]
|
||||
def sort_natural(input, property = nil)
|
||||
|
||||
@@ -15,7 +15,7 @@ module Liquid
|
||||
# @liquid_syntax
|
||||
# {% unless condition %}
|
||||
# expression
|
||||
# {% endif %}
|
||||
# {% endunless %}
|
||||
# @liquid_syntax_keyword condition The condition to evaluate.
|
||||
# @liquid_syntax_keyword expression The expression to render unless the condition is met.
|
||||
class Unless < If
|
||||
|
||||
Reference in New Issue
Block a user