protected static function SmartyPants::educateDashes in Typogrify 8
Educate dashes.
Example input: `Isn't this fun?' Example output: ‘Isn’t this fun?’
Parameters
string $_: Input text.
Return value
string The string, with each instance of "--" translated to an em-dash HTML entity.
1 call to SmartyPants::educateDashes()
- SmartyPants::process in src/
SmartyPants.php - SmartyPants.
File
- src/
SmartyPants.php, line 1091
Class
- SmartyPants
- SmartyPants - Smart punctuation for web sites.
Namespace
Drupal\typogrifyCode
protected static function educateDashes($_) {
$_ = str_replace('--', '—', $_);
return $_;
}