Answers.Body: <p>I believe filters are applied in the order they're written. So in your example you're probably applying the new line breaks with <code>nl2br</code> and then removing them again with hacksaw.</p>
  
  <p>Try:</p>
  
  <pre><code>&lt;p&gt;{{ workItem.summary | hacksaw(words='75', append='...') | nl2br }}&lt;/p&gt;
  </code></pre>
  
  <p>Alternatively you could try setting hacksaw to allow line break tags. Something like this (untested):</p>
  
  <pre><code>&lt;p&gt;{{ workItem.summary | nl2br | hacksaw(words='75', append='...', allow='&lt;br&gt;') }}&lt;/p&gt;
  </code></pre>
  
  <p>I'd go with the first option though.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-15T14:23:57.817Z
Answers.Text: Thanks for your time and answer, I realized after continuing to play with this that I do not need to add the function I was trying to add.  My issue is comes from adding "hacksaw" to the text is breaking the formatting, I was trying to solve by adding in the nl2br function but I was just misunderstanding the issue.
Answers.UserDisplayName: Rockwell Rice
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-15T08:01:17.827Z
Answers.LastActivityDate: 2016-02-15T08:01:17.827Z
Answers.UserDisplayName: Jamie Pittock
Body: <p>** </p>
  
  <p>After continuing to play around with this I realized that I did not need to add nl2br, adding hacksaw was actually removing the formatting from the rich text field.  I opened a new question <a href="https://craftcms.stackexchange.com/questions/13702/hacksaw-breaking-rich-text-field">here
  </a> if anyone can help or has encountered this issue any help would be appreciated.</p>
  
  <p>**</p>
  
  <p>I have a line</p>
  
  <pre><code> &lt;p&gt;{{ workItem.summary | hacksaw(words='75', append='...') }}&lt;/p&gt;
  </code></pre>
  
  <p>I need to add </p>
  
  <pre><code> nl2br
  </code></pre>
  
  <p>to it.  I have tried</p>
  
  <pre><code> &lt;p&gt;{{ workItem.summary | nl2br | hacksaw(words='75', append='...') }}&lt;/p&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code> &lt;p&gt;{{ nl2br (workItem.summary hacksaw(words='75', append='...')) }}&lt;/p&gt;
  </code></pre>
  
  <p>Neither worked.</p>
  
  <p>Can anyone shed some light on the syntax I need to get this to work correctly?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-14T23:47:41.687Z
Comments.Text: Do you mean [``nl2br``](http://twig.sensiolabs.org/doc/filters/nl2br.html) (new line to line break?) You have ``nb2lr``.
Comments.UserDisplayName: RitterKnight
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-15T00:48:29.203Z
Comments.Text: Ya that is what I meant
Comments.UserDisplayName: Rockwell Rice
Tags: <templating><filter>
Title: How to apply multiple Twig filters to text - SOLVED
ThreadText: # How to apply multiple Twig filters to text - SOLVED
  
  (Asked by: username_0 on 2016-02-14)
  
  \*\*
  
  After continuing to play around with this I realized that I did not need to add nl2br, adding hacksaw was actually removing the formatting from the rich text field. I opened a new question [here](https://craftcms.stackexchange.com/questions/13702/hacksaw-breaking-rich-text-field) if anyone can help or has encountered this issue any help would be appreciated.
  
  \*\*
  
  I have a line
  
  ```
   <p>{{ workItem.summary | hacksaw(words='75', append='...') }}</p>
  
  ```
  
  I need to add
  
  ```
   nl2br
  
  ```
  
  to it. I have tried
  
  ```
   <p>{{ workItem.summary | nl2br | hacksaw(words='75', append='...') }}</p>
  
  ```
  
  and
  
  ```
   <p>{{ nl2br (workItem.summary hacksaw(words='75', append='...')) }}</p>
  
  ```
  
  Neither worked.
  
  Can anyone shed some light on the syntax I need to get this to work correctly?
  
  **Tags:** templating, filter
  
  > **Comments:**
  > **username_1**: Do you mean [``nl2br``](http://twig.sensiolabs.org/doc/filters/nl2br.html) (new line to line break?) You have ``nb2lr``.  
  > **username_0**: Ya that is what I meant  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-02-15. Score: 6
  
  I believe filters are applied in the order they're written. So in your example you're probably applying the new line breaks with `nl2br` and then removing them again with hacksaw.
  
  Try:
  
  ```
  <p>{{ workItem.summary | hacksaw(words='75', append='...') | nl2br }}</p>
  
  ```
  
  Alternatively you could try setting hacksaw to allow line break tags. Something like this (untested):
  
  ```
  <p>{{ workItem.summary | nl2br | hacksaw(words='75', append='...', allow='<br>') }}</p>
  
  ```
  
  I'd go with the first option though.
  
  > **Comments:**
  > **username_0**: Thanks for your time and answer, I realized after continuing to play with this that I do not need to add the function I was trying to add.  My issue is comes from adding "hacksaw" to the text is breaking the formatting, I was trying to solve by adding in the nl2br function but I was just misunderstanding the issue.  
  
  ---
  
  