Created
October 8, 2014 17:47
-
-
Save dvschultz/d27a86d3363effd4edd3 to your computer and use it in GitHub Desktop.
PHP implementation for em dash wrapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* no-wrap around em dashes */ | |
if (preg_match("/[a-zA-Z0-9\&\#\;]{1,}?\&mdash\;/", $html)) { | |
$html = preg_replace("/[a-zA-Z0-9\&\#\;]{1,}?\&mdash\;/", '<span style="white-space: nowrap;">$0</span>', $html); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment