summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/unicodify.sed13
1 files changed, 10 insertions, 3 deletions
diff --git a/script/unicodify.sed b/script/unicodify.sed
index 358586a..ae33151 100644
--- a/script/unicodify.sed
+++ b/script/unicodify.sed
@@ -1,9 +1,16 @@
# Remove spaces on either end of an em-dash.
s,[[:space:]]--[[:space:]],\&\#8212;,g
-# Explicitly handle double-quotes before single-quotes.
-s,"`,\&\#8220;,g
-s,`",\&\#8221;,g
+# WilloraPDF extension: explicit "unmatched" double-quote shortcuts.
+#
+# This is to work around a shortcoming in Asciidoctor when a double-quote is
+# right up against a non-word character -- em-dashes, ellipses, etc. TL;DR
+# it's better to let Asciidoctor handle ("`) and (`") automatically by
+# default EXCEPT FOR the times we need to wrangle it ourselves.
+s,\&_OPENDOUBLEQUOTE;,\&\#8220;,g
+s,\&_CLOSEDOUBLEQUOTE;,\&\#8221;,g
+
+# Curly single quotes.
s,'`,\&\#8216;,g
s,`',\&\#8217;,g