mirror of
https://github.com/kemko/liquid.git
synced 2026-01-02 00:05:42 +03:00
Add example to split filter.
This commit is contained in:
@@ -54,6 +54,10 @@ module Liquid
|
||||
end
|
||||
|
||||
# Split input string into an array of substrings separated by given pattern.
|
||||
#
|
||||
# Example:
|
||||
# <div class="summary">{{ post | split '//' | first }}</div>
|
||||
#
|
||||
def split(input, pattern)
|
||||
input.split(pattern)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user