From 930590a368b21c011536cd454a5e434c8438d492 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Sat, 29 Apr 2023 20:41:50 -0500 Subject: minor fixes? --- usfm2gmi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usfm2gmi.py') diff --git a/usfm2gmi.py b/usfm2gmi.py index 5aa1a78..e618870 100755 --- a/usfm2gmi.py +++ b/usfm2gmi.py @@ -35,7 +35,7 @@ def superscript(word): def convert(line): """Convert a string to a list of tuples, each a token""" # TODO: preserve the lack of whitespace before a backslash. - split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\+nd*','\\+nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').replace('\\w*','\\w* ').replace('\\+w*', '\\+w* ').split() + split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\+nd*','\\+nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').replace('\\w*',' \\w* ').replace('\\+w*', '\\+w* ').split() out = '' nd = False if len(split) == 0: @@ -67,7 +67,7 @@ def convert(line): out += '\n* ' elif word in ['\\q', '\\q1']: out += '\n> ' - elif word in ['\\q2']: + elif word in ['\\q2', '\\q22']: # \q22 is bad input out += '\n>\t' elif word in ['\\q3']: out += '\n>\t\t' -- cgit 1.4.1