Convert usfm bibles into gemtext (python library/utility)
nd: add kludge so this works better (against the spec?)
Zach DeCook 2021-02-25
parent f3a3cd4 · commit befa664
-rwxr-xr-xusfm2gmi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/usfm2gmi.py b/usfm2gmi.py
index 0337153..54685f7 100755
--- a/usfm2gmi.py
+++ b/usfm2gmi.py
@@ -18,7 +18,7 @@ def smallcaps(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('\\', ' \\').split()
+ split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').split()
out = ''
nd = False
if len(split) == 0: