function EducateDashesOldSchool in Typogrify 6
Same name and namespace in other branches
- 5 smartypants.php \EducateDashesOldSchool()
- 7 smartypants.php \EducateDashesOldSchool()
1 call to EducateDashesOldSchool()
1 string reference to 'EducateDashesOldSchool'
File
- ./
smartypants.php, line 505 - smartypants.php SmartyPants - Smart punctuation for web sites
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 $_;
}