about summary refs log tree commit diff
path: root/usfm2gmi.py
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2021-04-22 07:42:58 -0400
committerZach DeCook <zachdecook@librem.one>2021-04-22 07:42:58 -0400
commite283c7c96d11c6e51fea5e1db896ac47edf0b806 (patch)
tree78f980f8779a0062beb064b57efe496f756510d7 /usfm2gmi.py
parent726dd0d845804fef131c760e6a80a5a9c043e78b (diff)
downloadusfm2gmi-e283c7c96d11c6e51fea5e1db896ac47edf0b806.tar.gz
divine name: use another tag for this
Diffstat (limited to 'usfm2gmi.py')
-rwxr-xr-xusfm2gmi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/usfm2gmi.py b/usfm2gmi.py
index d0a2167..ffdf65e 100755
--- a/usfm2gmi.py
+++ b/usfm2gmi.py
@@ -35,7 +35,7 @@ def superscript(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('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').replace('\\w*','\\w* ').split()
+  split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\+nd*','\\+nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').replace('\\w*','\\w* ').split()
   out = ''
   nd = False
   if len(split) == 0:
@@ -79,9 +79,9 @@ def convert(line):
       out += '*'
     elif word in ['\\em*', '\\it*']:
       out = out.rstrip() + '*'
-    elif word == '\\nd':
+    elif word in ['\\nd','\\+nd']:
       nd = True
-    elif word == '\\nd*':
+    elif word in ['\\nd*','\\+nd*']:
       nd = False
     # Footnotes (https://ubsicap.github.io/usfm/notes_basic/fnotes.html)
     elif word == '\\f':