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

Letters mistaken for ordinals?

sjenset opened this issue · comments

Ran into a weird issue today - unfortunately, I'm not sure exactly when it started appearing (bug-report filed by a customer last night, but based on an article that's ~2 weeks old). This is on a Norwegian site, so I guess it might have something to do with transliteration - but not sure.

Basically, I've had to turn set_smart_ordinal_suffixfrom true to false to prevent the plugin for wrapping the letter e in a <sup class="ordinal"> if it directly follows an uppercase D:

image

Both set_diacritic_language and set_hyphenation_language are set to nb-NO - other than that I think the only config-tweak that has been made is to disable set_smart_fractions - but let me know if you need any more settings etc. to look into this :)

You have to disable Roman numeral detection.

You have to disable Roman numeral detection.

What's the setting for that called?

It's \PHP_Typography\Settings::set_smart_ordinal_suffix_match_roman_numerals in the library. Not sure how that maps to craft-typography. Should be off by default, though.

It's \PHP_Typography\Settings::set_smart_ordinal_suffix_match_roman_numerals in the library. Not sure how that maps to craft-typography. Should be off by default, though.

Hmm, this is weird. I've never set it to "on" in any way to the best of my knowledge, but when I went back to re-examine this issue now (I had, tbh, forgotten about it slightly) the issue seems to have disappeared even though I've re-enabled set_smart_ordinal_suffix locally.

Maybe a underlying Craft-update did something weird in one of the minor-versions that has since been fixed? 😕

The separate setting was introduced in 6.4.3, all the 6.4.x minor releases before had the behavior activated all the time.

Well, I think we can safely close this one for now - and hopefully the comments will help others who might run into the same issue figure out how to overcome it :)