function EducateDashes in Typogrify 6
Same name and namespace in other branches
- 5 smartypants.php \EducateDashes()
- 7 smartypants.php \EducateDashes()
1 call to EducateDashes()
1 string reference to 'EducateDashes'
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 $_;
}