You are here

protected static function SmartyPants::numberThinsp in Typogrify 8

Wrapping numbers and adding whitespace ' '.

Parameters

array $hit: A matcher-array from preg_replace_callback.

Return value

string The first non-empty numeric string in $hit. Depending on where in the array it is, add whitespace and wrap in a <span>.

File

src/SmartyPants.php, line 759

Class

SmartyPants
SmartyPants - Smart punctuation for web sites.

Namespace

Drupal\typogrify

Code

protected static function numberThinsp(array $hit) {
  return self::numberReplacer($hit, '&#8201;');
}