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

Hyphenation not get applied to last word in a sentence

pau-ker opened this issue · comments

issue

I am using the filter like this:

{% filter typogrify %}
<h1>Schwangerschaft</h1>
{% endfilter %}

Could this potentially be due to the language dictionaries? What language is the website in?

The language is german.
I have tested it with different words and sentence lengths. Same result.

My workaround is to add a string like "foo" than use the filter and remove "foo" from the end of the sentence.

So since Typogrify depends on the PhpTypography library to do its thing, you might want to post the issue over there... or also just try doing a composer update to pull down the latest, to see if he's fixed anything.

https://github.com/mundschenk-at/php-typography

Unfortunately the bug is still in the latest version. I will post the issue over there.
Thanks Andrew

LMK what the answer ends up being @pau-ker !

@pau-ker Have you been able to fix this issue? I've seen it hear and tried to reproduce this with plain php-typography, but I could not. Either it depends on special settings or it actually is an issue with the way craft-typogrify uses the library.

Hi, I've landed here from https://craftcms.stackexchange.com/questions/35144/typogrify-hyphenation-not-kicking-in

My language is also german. Actually, even de-CH. I'm not getting hyphenations in my text, which is a pity (I think, expecting better results from PHP side than from browser-hyphenation..)

See the thread above @ursbraem

craft-typogrify is just a pass-through to php-typography but @mundschenk-at couldn't reproduce it, so it's likely a combination of the settings as he mentioned.

Hey, i just wanted to mention, to fix this, set "set_dewidow" => false, in your config file.

i tested all config settings one by one and figured out, that setting "set_dewidow" to false solves it for me.