Convert usfm bibles into gemtext (python library/utility)
nd: add kludge so this works better (against the spec?)
| -rwxr-xr-x | usfm2gmi.py | 2 |
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: |