craft-typogrify icon indicating copy to clipboard operation
craft-typogrify copied to clipboard

Adds a filter to allow linebreaks on a forward slash

Open raddevon opened this issue 10 years ago • 0 comments

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.

raddevon avatar Jun 27 '14 18:06 raddevon