mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Fix formatting for filter examples.
+3
-3
@@ -56,8 +56,8 @@ Hello {{ 'now' | date: "%Y %h" }}
|
||||
* `strip_newlines` - strip all newlines (\n) from string
|
||||
* `newline_to_br` - replace each newline (\n) with html break
|
||||
* `replace` - replace each occurrence *e.g.* `{{ 'foofoo' | replace:'foo','bar' }} #=> 'barbar'`
|
||||
* `replace_first` - replace the first occurrence e.g. `{{ 'barbar' | replace_first:'bar','foo' }} #=> 'foobar'`
|
||||
* `remove` - remove each occurrence `e.g. `{{ 'foobarfoobar' | remove:'foo' }} #=> 'barbar'`
|
||||
* `replace_first` - replace the first occurrence *e.g.* `{{ 'barbar' | replace_first:'bar','foo' }} #=> 'foobar'`
|
||||
* `remove` - remove each occurrence *e.g.* `{{ 'foobarfoobar' | remove:'foo' }} #=> 'barbar'`
|
||||
* `remove_first` - remove the first occurrence *e.g.* `{{ 'barbar' | remove_first:'bar' }} #=> 'bar'`
|
||||
* `truncate` - truncate a string down to x characters
|
||||
* `truncatewords` - truncate a string down to x words
|
||||
@@ -65,7 +65,7 @@ Hello {{ 'now' | date: "%Y %h" }}
|
||||
* `append` - append a string *e.g.* `{{ 'foo' | append:'bar' }} #=> 'foobar'`
|
||||
* `minus` - subtraction *e.g.* `{{ 4 | minus:2 }} #=> 2`
|
||||
* `plus` - addition *e.g.* `{{ '1' | plus:'1' }} #=> '11'`, `{{ 1 | plus:1 }} #=> 2`
|
||||
* `times` - multiplication *e.gw* `{{ 5 | times:4 }} #=> 20`
|
||||
* `times` - multiplication *e.g* `{{ 5 | times:4 }} #=> 20`
|
||||
* `divided_by` - division *e.g.* `{{ 10 | divided_by:2 }} #=> 5`
|
||||
* `split` - split a string on a matching pattern *e.g.* `{{ "a~b" | split:~ }} #=> ['a','b']`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user