Em-dash auto replace.
This commit is contained in:
parent
93c6012aee
commit
83b062a896
|
@ -161,7 +161,12 @@
|
||||||
if(AUTO_UNICODE) {
|
if(AUTO_UNICODE) {
|
||||||
$body = str_replace('...', '…', $body);
|
$body = str_replace('...', '…', $body);
|
||||||
$body = str_replace('<--', '←', $body);
|
$body = str_replace('<--', '←', $body);
|
||||||
$body = str_replace('--', '—', $body);
|
|
||||||
|
// En and em- dashes are rendered exactly the same in
|
||||||
|
// most monospace fonts (they look the same in code
|
||||||
|
// editors).
|
||||||
|
$body = str_replace('--', '–', $body); // en dash
|
||||||
|
$body = str_replace('---', '—', $body); // em dash
|
||||||
}
|
}
|
||||||
|
|
||||||
$body = utf8tohtml($body, true);
|
$body = utf8tohtml($body, true);
|
||||||
|
@ -563,4 +568,5 @@
|
||||||
function int_to_word($n) {
|
function int_to_word($n) {
|
||||||
return chr($n & 255).chr(($n >> 8) & 255);
|
return chr($n & 255).chr(($n >> 8) & 255);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue