You are here

protected static function SmartyPants::abbrThinsp in Typogrify 8

Wrapping abbreviations adding whitespace ' '.

Parameters

array $hit: A matcher-array from preg_replace_callback.

Return value

string The first element of the array, wrapped in a span.

File

src/SmartyPants.php, line 864

Class

SmartyPants
SmartyPants - Smart punctuation for web sites.

Namespace

Drupal\typogrify

Code

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