Truncatewords adding … when not truncating

Galen King's Avatar

Galen King

09 Feb, 2011 12:56 AM via web

It seems that the ellipsis (…) is being added even if a phrase is not trunacted.

Take a look at http://luciddesign.co.nz/packaging/. The title tag shouldn't need an ellipsis as there are only nine words in the first place (and I'm using truncatewords: 9).

  1. 2 Posted by John Nunemaker on 09 Feb, 2011 01:13 AM

    John Nunemaker's Avatar

    K. I will look into this soon. On a plane now. ;)

  2. 3 Posted by Galen King on 09 Feb, 2011 01:14 AM

    Galen King's Avatar

    Heh heh. Show off! :-)

  3. 4 Posted by John Nunemaker on 04 Mar, 2011 04:45 PM

    John Nunemaker's Avatar

    Looking into this right now.

  4. 5 Posted by John Nunemaker on 04 Mar, 2011 05:02 PM

    John Nunemaker's Avatar

    Fixed. truncatewords in Liquid standard filters didn't work quite like one would expect. If you pass it a word that is 9 long and set the max to 9, it actually truncated when it didn't need to.

    I just overrode that method with our own for harmony that works correctly. Checked your site and you are good to go.

  5. Jonathan Hoyt closed this discussion on 07 Oct, 2011 12:49 AM.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

17 May, 2012 10:45 PM
20 Mar, 2012 05:05 PM
26 Apr, 2012 01:40 AM
07 Mar, 2012 04:42 PM