Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soft hyphens (­) are output as visible characters #81

Open
fthues opened this issue Jan 5, 2022 · 1 comment
Open

Soft hyphens (­) are output as visible characters #81

fthues opened this issue Jan 5, 2022 · 1 comment

Comments

@fthues
Copy link

fthues commented Jan 5, 2022

We're character-splitting headlines containing ­ soft hyphens. Those are usually invisible and act as a hyphenation hint for the browser.

This is how Califor­nia Dreaming is rendered, note the extra glyph (U+F8FF):

Screenshot 2022-01-05 at 13 50 47

Screenshot 2022-01-05 at 13 50 39

Different font, same issue (here ­ is rendered as a different glyph):

Screenshot 2022-01-05 at 13 56 13

Is there a way to ignore the ­s when processing the DOM?

Edit: This is Chrome/macOS. Seems fine on Firefox.

@fthues
Copy link
Author

fthues commented Jan 5, 2022

Simply checking for and stripping the offending unicode character (00AD) from contents inside the splitText function works, but then of course the soft hyphen is thrown out completely as if it was never there.

Hm, the unprocessed &shy; would need to be wedged back in between the generated <span class="char">s..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant