Handle apostrophes sligtly smarter
authorJonathan Blake <jonathan.blake@projectaon.org>
Sun, 8 Sep 2019 00:16:09 +0000 (17:16 -0700)
committerJonathan Blake <jonathan.blake@projectaon.org>
Sun, 8 Sep 2019 00:16:09 +0000 (17:16 -0700)
common/scripts/xmlize.pl

index 063bd05..d78bd94 100755 (executable)
@@ -135,6 +135,7 @@ sub xmlize {
     $inline =~ s/\&(?=[[:space:]])/<ch.ampersand\/>/g;
     $inline =~ tr/\"\`/\'/;
     $inline =~ s/[\N{U+2018}\N{U+201C}]/<quote>/g;
+    $inline =~ s|[\N{U+2019}\N{U+201D}]([[:alpha:]])|<ch.apos/>$1|g;
     $inline =~ s/[\N{U+2019}\N{U+201D}]/<\/quote>/g;
     $inline =~ s/[\N{U+2014}]/<ch.endash\/>/g;
     $inline =~ s/[\N{U+2014}]/<ch.emdash\/>/g;