diff options
| author | Paul Merrill <napalminc@gmail.com> | 2010-11-05 09:11:42 -0700 |
|---|---|---|
| committer | Paul Merrill <napalminc@gmail.com> | 2010-11-05 09:11:42 -0700 |
| commit | 83b062a89633da8b84aa7664c5bbeed53f4697f7 (patch) | |
| tree | b7e423d3a51edef59b51283ee9afd5bec97652cc /inc/functions.php | |
| parent | 93c6012aee65908006c1864c835d40f321c5a1e4 (diff) | |
Em-dash auto replace.
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php index 9a33a16b..a26e952b 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -161,7 +161,12 @@ if(AUTO_UNICODE) { $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); @@ -563,4 +568,5 @@ function int_to_word($n) { return chr($n & 255).chr(($n >> 8) & 255); } -?>
\ No newline at end of file +?> + |
