changeset 25:d3eb798f7e95

Fix curling inside double quotes.
author David Barts <n5jrn@me.com>
date Sun, 15 Mar 2020 10:52:55 -0700
parents f4cc6d8cafe8
children 3264788aa0c8
files curlers.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/curlers.py	Wed Jan 15 11:55:15 2020 -0800
+++ b/curlers.py	Sun Mar 15 10:52:55 2020 -0700
@@ -92,7 +92,7 @@
             ws[pos] = RDQUO
             self._state = self._norm
         elif char == "'":
-            if ws[pos-1].isalpha():
+            if ws[pos-1].isalnum():
                 # either an inter-word, or an end of word, apostrophe
                 ws[pos] = APOS
             elif ws[pos+1].isdecimal() or _is_cockney(pos, ws):
@@ -205,7 +205,7 @@
             ws[pos] = RDQUO
             self._state = self._norm
         elif char == "'":
-            if ws[pos-1].isalpha():
+            if ws[pos-1].isalnum():
                 # either an inter-word, or an end of word, apostrophe
                 ws[pos] = APOS
             elif ws[pos+1].isdecimal() or _is_cockney(pos, ws):