protected static function SmartyPants::educateDashesOldSchool in Typogrify 8
EducateDashesOldSchool.
Parameters
string $_: Input text.
Return value
string The string, with each instance of "--" translated to an en-dash HTML entity, and each "---" translated to an em-dash HTML entity.
1 call to SmartyPants::educateDashesOldSchool()
- SmartyPants::process in src/
SmartyPants.php - SmartyPants.
File
- src/
SmartyPants.php, line 1107
Class
- SmartyPants
- SmartyPants - Smart punctuation for web sites.
Namespace
Drupal\typogrifyCode
protected static function educateDashesOldSchool($_) {
$_ = str_replace([
"---",
"--",
], [
'—',
'–',
], $_);
return $_;
}