You are here

function EducateDashes in Typogrify 6

Same name and namespace in other branches
  1. 5 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 492
smartypants.php SmartyPants - Smart punctuation for web sites

Code

function EducateDashes($_) {

  #

  #   Parameter:  String.

  #

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

  #               an em-dash HTML entity.

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