word break between two pages hide the hyphen character
The problem
There is some weird behavior when words are cut betweeen page, that can either be:
- an infinite loop, as the browser try to put the content in the page, but since there is not enough room, it creates a new page again and again;
- the second part of the word go to the next page, but the hyphens character doesnt appear.
How should it work
If hyphenization is set for the whole content: the last word of a page should be cut AND the hyphen character should appear.
As a side note, inDesign provides tools that let you set the maximum number of consecutive hyphens (which at some point will be help by the browser) and also a check box to prevent prevent a word splitted from being hyphenated. The latter would be a great addition to the W3C specs (and the lib).
Possible solution
- if the element is hyphenated (auto or manual), the last word of the page should get an hyphen in a
:after
pseudo-element.
More info:
Unicode hyphen number is U+2010
Note that the ­
is not a character in itself but a hyphen hint (a complete reference is available here: http://jkorpela.fi/shy.html#concl)