You are here

function EducateDashes in Typogrify 5

Same name and namespace in other branches
  1. 6 smartypants.php \EducateDashes()
  2. 7 smartypants.php \EducateDashes()
1 call to EducateDashes()
SmartyPants in ./smartypants.php
1 string reference to 'EducateDashes'
SmartDashes in ./smartypants.php

File

./smartypants.php, line 524

Code

function EducateDashes($_) {

  #

  #   Parameter:  String.

  #

  #   Returns:    The string, with each instance of "--" translated to

  #               an em-dash HTML entity.

  #
  $_ = str_replace('--', '—', $_);
  return $_;
}