craft-typogrify
craft-typogrify copied to clipboard
Adds a filter to allow linebreaks on a forward slash
Not sure how universally useful this is, but I found myself needing it for a project. Figured I'd add it to typogrify rather than building my own plugin and put it out there in the event anyone else needs it.
The breakslash filter inserts <wbr>
after any forward slash not preceded by <
(which should prevent it from messing up HTML tags). <wbr>
allows the browser to break the line at this point. Compensates for browser inconsistencies with the CSS word-wrap
property, at least in this one tiny case.