nystudio107 / craft-typogrify

Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more

Home Page:https://nystudio107.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All versions of wordLimit add the ... even when not truncated

jmcgaha opened this issue · comments

Switching to truncateOnWord fixed this temporarily

Craft 3.1.16
Typogrify 1.1.16

I can also confirm this, here's a test case:

Browse over 300 courses to find a career path that's right for you. (13 words)

Apply a word limit value that's higher than the word count in the test case:

{{ 'Browse over 300 courses to find a career path that's right for you.' |wordLimit(20) }}

The output becomes:

Browse over 300 courses to find a career path that's right for you....

Given the word count of the test case is < 20, nothing should have been appended. This was observed on Craft 2 site that originally used the hacksaw plugin.

Hope that makes sense.

fixed in 770939b