Forum How do I...?

Allow linebreak before or after em-dash?

_savage
I've got a long line of text with em-dashes, e.g. "some text here—more text here".

I noticed that the use of the em-dash (and perhaps other dashes) seems to create a non-linebreakable unit, whereas a linebreak would be acceptable either before or after the dash. The result is an overabundance of word spacing in the line to stretch the words apart, and then to move "here—more" onto the next line.

Is there a way for Prince to allow linebreaks before or after dashes?
mikeday
You can use the prince-text-replace property to add a zero width space after em dashes, like this:
prince-text-replace: '\2014' '\2014\200b'
_savage
Very neat, thank you Mike :)