about summary refs log tree commit diff
path: root/usx2gmi.py
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2021-04-26 08:15:15 -0400
committerZach DeCook <zachdecook@librem.one>2021-04-26 08:15:15 -0400
commita3e7f46093c6ef9b72ca00249e41f542d06de6ce (patch)
tree05f5afd51aa37648c023f31f9398fe45775fe369 /usx2gmi.py
parent2ac94408df2d2124f1012813bcf37b219006f03d (diff)
downloadusfm2gmi-a3e7f46093c6ef9b72ca00249e41f542d06de6ce.tar.gz
usx2gmi: put notes in brackets
Diffstat (limited to 'usx2gmi.py')
-rwxr-xr-xusx2gmi.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/usx2gmi.py b/usx2gmi.py
index 683d515..13eaf86 100755
--- a/usx2gmi.py
+++ b/usx2gmi.py
@@ -26,12 +26,17 @@ def convertBlock(thing):
 def convertInline(thing):
     # TODO: Implement this.
     out = ''
+    # TODO: move note after the next word/phrase?
+    if thing.tag == 'note':
+      out += '['
     if thing.text:
-        out = thing.text.replace("\n"," ").strip()
+        out = thing.text.replace("\n"," ")
     for t in thing:
         out += convertInline(t)
         if t.tail:
           out += t.tail.replace("\n"," ")
+    if thing.tag == 'note':
+      out += ']'
 
     return out