summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorCharlotte Koch <charlotte@magentastripe.com>2024-09-13 17:58:48 -0700
committerCharlotte Koch <charlotte@magentastripe.com>2024-09-13 17:58:48 -0700
commit7191efe974a7ddbddd80f5ed3eaf171e963d9eda (patch)
tree804d650487102ea61fb0d2c7b45b88aff36412a1 /script
parent8c0342ffd57527cc649737c258ceb9485c45d36c (diff)
Handle ellipses interactions with curly double quotes
Diffstat (limited to 'script')
-rw-r--r--script/unicodify.sed7
1 files changed, 5 insertions, 2 deletions
diff --git a/script/unicodify.sed b/script/unicodify.sed
index ae33151..a95fec0 100644
--- a/script/unicodify.sed
+++ b/script/unicodify.sed
@@ -1,5 +1,6 @@
-# Remove spaces on either end of an em-dash.
+# Remove spaces on either end of an em-dash or ellipsis.
s,[[:space:]]--[[:space:]],\&\#8212;,g
+s,[[:space:]]\.\.\.[[:space:]],\&\#8230;,g
# WilloraPDF extension: explicit "unmatched" double-quote shortcuts.
#
@@ -10,7 +11,9 @@ s,[[:space:]]--[[:space:]],\&\#8212;,g
s,\&_OPENDOUBLEQUOTE;,\&\#8220;,g
s,\&_CLOSEDOUBLEQUOTE;,\&\#8221;,g
-# Curly single quotes.
+# Explicitly handle curly double quotes before curly single quotes.
+s,"`,\&\#8220;,g
+s,`",\&\#8221;,g
s,'`,\&\#8216;,g
s,`',\&\#8217;,g