From 62fd0201033f376e60c90200544aa1d51c193a52 Mon Sep 17 00:00:00 2001 From: matiasleidemer Date: Tue, 16 Sep 2014 06:15:40 -0700 Subject: [PATCH] Indicate the second parameter on truncate --- Liquid for Designers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Liquid for Designers.md b/Liquid for Designers.md index 136df72..15d3cb8 100644 --- a/Liquid for Designers.md +++ b/Liquid for Designers.md @@ -59,7 +59,7 @@ Hello {{ 'now' | date: "%Y %h" }} * `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 +* `truncate` - truncate a string down to x characters. It also accepts a second parameter that will append to the string *e.g.* `{{ 'foobarfoobar' | truncate: 5, '.' }} #=> 'foob.'` * `truncatewords` - truncate a string down to x words * `prepend` - prepend a string *e.g.* `{{ 'bar' | prepend:'foo' }} #=> 'foobar'` * `append` - append a string *e.g.* `{{ 'foo' | append:'bar' }} #=> 'foobar'`