You are here

protected static function SmartyPants::numberSpan in Typogrify 8

Wrapping numbers and adding whitespace by setting margin-left in a span.

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 773

Class

SmartyPants
SmartyPants - Smart punctuation for web sites.

Namespace

Drupal\typogrify

Code

protected static function numberSpan(array $hit) {
  $thbl = '<span style="margin-left:0.167em"></span>';
  return self::numberReplacer($hit, $thbl);
}