From 732d53b91422f1503e6ce18930adf61b27902dc9 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Thu, 25 Feb 2021 15:19:55 -0500 Subject: wj: ignore. red letters considered harmful --- usfm2gmi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usfm2gmi.py') diff --git a/usfm2gmi.py b/usfm2gmi.py index 2d27827..4edf6b8 100755 --- a/usfm2gmi.py +++ b/usfm2gmi.py @@ -6,7 +6,8 @@ def printf(string): def convert(line): """Convert a string to a list of tuples, each a token""" - split = line.split() + # TODO: preserve the lack of whitespace before a backslash. + split = line.replace('\\', ' \\').split() out = '' if len(split) == 0: return out @@ -30,6 +31,8 @@ def convert(line): skip = 1 elif word == '\\p': out += '\n' + elif word in ['\\wj','\\wj*']: + continue else: out += word + ' ' return out -- cgit 1.4.1