function _typogrify_abbr_thinsp in Typogrify 7
Wrapping abbreviations adding whitespace ' '.
Parameters
array $hit: matcher-array from preg_replace_callback.
1 string reference to '_typogrify_abbr_thinsp'
- typogrify_smart_abbreviation in ./
smartypants.php - Wrapping abbreviations and adding half space between digit grouping.
File
- ./
smartypants.php, line 760 - SmartyPants - Smart punctuation for web sites
Code
function _typogrify_abbr_thinsp($hit) {
$res = preg_replace('/\\.(\\p{L})/u', '. \\1', $hit[0]);
return '<span class="abbr">' . $res . '</span>';
}