function EducateDashesOldSchool in Typogrify 5
Same name and namespace in other branches
- 6 smartypants.php \EducateDashesOldSchool()
- 7 smartypants.php \EducateDashesOldSchool()
1 call to EducateDashesOldSchool()
1 string reference to 'EducateDashesOldSchool'
File
- ./
smartypants.php, line 537
Code
function EducateDashesOldSchool($_) {
#
# Parameter: String.
#
# Returns: The string, with each instance of "--" translated to
# an en-dash HTML entity, and each "---" translated to
# an em-dash HTML entity.
#
# em en
$_ = str_replace(array(
"---",
"--",
), array(
'—',
'–',
), $_);
return $_;
}