Add example to split filter.

This commit is contained in:
7rans
2012-02-10 13:45:35 -05:00
parent d8b416187a
commit 974ea40cca

View File

@@ -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