diff --git a/usfm2gmi.py b/usfm2gmi.py
index 32c5644..b7e993d 100755
--- a/usfm2gmi.py
+++ b/usfm2gmi.py
@@ -35,7 +35,7 @@ def superscript(word):
def convert(line, printStrongs=False):
"""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* ').replace('\\ref*', '\\ref* ').split()
+ split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\+nd*','\\+nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').replace('\\w*',' \\w* ').replace('\\+w*', '\\+w* ').replace('\\ref*', '\\ref* ').replace('\\+w', ' \\+w').replace('\\+wa*', '\\+wa* ').replace('\\+wg*', '\\+wg* ').replace('\\+wh*', '\\+wh* ').split()
out = ''
nd = False
superS = False
@@ -80,6 +80,12 @@ def convert(line, printStrongs=False):
continue
elif word in ['\\r']:
out += '\n> '
+ elif word in ['\\+wa', '\\+wa*', '\\wa', '\\wa*']: # https://docs.usfm.bible/usfm/3.1/char/features/wa.html
+ continue
+ elif word in ['\\+wg', '\\+wg*', '\\wg', '\\wg*']: # https://docs.usfm.bible/usfm/3.1/char/features/wg.html
+ continue
+ elif word in ['\\+wh', '\\+wh*', '\\wh', '\\wh*']: # https://docs.usfm.bible/usfm/3.1/char/features/wh.html
+ continue
elif word in ['\\wj','\\wj*']:
continue
elif word in ['\\em','\\it']:
|