diff options
| author | Zach DeCook <zachdecook@librem.one> | 2023-04-29 20:41:50 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2023-04-29 20:41:50 -0500 |
| commit | 930590a368b21c011536cd454a5e434c8438d492 (patch) | |
| tree | 15b2fc31e6293fac36eb9330a4b63f7033d5d713 /usfm2gmi.py | |
| parent | 21a75c18879896bd5380b37551bf28f473f6105a (diff) | |
| download | usfm2gmi-930590a368b21c011536cd454a5e434c8438d492.tar.gz | |
minor fixes?
Diffstat (limited to 'usfm2gmi.py')
| -rwxr-xr-x | usfm2gmi.py | 4 |
1 files changed, 2 insertions, 2 deletions
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' |
