function EducateEllipses in Typogrify 5
Same name and namespace in other branches
- 6 smartypants.php \EducateEllipses()
 - 7 smartypants.php \EducateEllipses()
 
2 calls to EducateEllipses()
File
- ./
smartypants.php, line 576  
Code
function EducateEllipses($_) {
  #
  #   Parameter:  String.
  #   Returns:    The string, with each instance of "..." translated to
  #               an ellipsis HTML entity. Also converts the case where
  #               there are spaces between the dots.
  #
  #   Example input:  Huh...?
  #   Example output: Huh…?
  #
  $_ = str_replace(array(
    "...",
    ". . .",
  ), '…', $_);
  return $_;
}