From ebde9e930ee362bb00d9376626fb6c26f043d60c Mon Sep 17 00:00:00 2001 From: Petar Bojinov Date: Wed, 25 Feb 2015 15:13:24 -0800 Subject: [PATCH] add chaining filters example to README.md Add example of chaining `words` and `characters` filters. Useful scenario when the maximum amount of words is too long and you want to provide a maximum character fallback. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 10d3976..171085b 100644 --- a/README.md +++ b/README.md @@ -32,4 +32,11 @@ By default, a _word_ will not be truncated. Set the optional boolean after the c

{{ text | characters:25 :true}}

- ``` \ No newline at end of file + ``` + +Filters can also be chained together. It will truncate after 25 words or before 25 words if the 100 character limit is reached. + ```html +

+ {{ text | words:25 | characters: 100}} +

+ ```