You are here

function _typogrify_abbr_narrownbsp in Typogrify 7

Wrapping abbreviations adding whitespace '&narrownbsp;'.

Parameters

array $hit: matcher-array from preg_replace_callback.

1 string reference to '_typogrify_abbr_narrownbsp'
typogrify_smart_abbreviation in ./smartypants.php
Wrapping abbreviations and adding half space between digit grouping.

File

./smartypants.php, line 771
SmartyPants - Smart punctuation for web sites

Code

function _typogrify_abbr_narrownbsp($hit) {
  $res = preg_replace('/\\.(\\p{L})/u', '. \\1', $hit[0]);
  return '<span class="abbr">' . $res . '</span>';
}