diff options
| author | Zach DeCook <zachdecook@librem.one> | 2021-02-25 15:19:55 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2021-02-25 15:47:52 -0500 |
| commit | 732d53b91422f1503e6ce18930adf61b27902dc9 (patch) | |
| tree | 634836d4fe6a77f0c68f31ae81bc79f323d009f9 /usfm2gmi.py | |
| parent | 9cd73b7bf2af888dcba3a4a53caf00d0b4f71b58 (diff) | |
| download | usfm2gmi-732d53b91422f1503e6ce18930adf61b27902dc9.tar.gz | |
wj: ignore. red letters considered harmful
Diffstat (limited to 'usfm2gmi.py')
| -rwxr-xr-x | usfm2gmi.py | 5 |
1 files changed, 4 insertions, 1 deletions
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 |
