mundschenk-at / php-typography

A PHP library for improving your web typography.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keep units together (€)

strarsis opened this issue · comments

Issue Overview

Units should be kept together, '€' had been added to the list of units.

Steps to Reproduce (for bugs)

  1. Have text on page that contains a price with a currency like "10 €" where its container should cause word breaking/hyphenation.
  2. Notice that still a break occurs between the number (here "10") and the currency symbol (here "€").
    The value and currency symbol are not wrapped into a wrapper element.
  3. Adding the "€" to the list of units in wp-typography settings doesn't seem to prevent breaking.

WordPress 4.9.8, wp-typography 5.4.2, Gutenberg editor page.
Recent Chrome on Windows 10 Pro x64.

Expected Behavior

No breaking between value and unit symbol.

Current Behavior

Prices with currency symbol (e.g. "10 €") are apparently not handled.

I'll look into it. Might be a problem with mundschenk-at/php-typography.

Uh-oh. There were a lot of issues with the unit spacing routines. Thanks for the report!

@mundschenk-at: It would be great if php-typography dependency could also be updated in wp-typography plugin and published.

Yes, of course, in due time :)