about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2021-04-26 07:54:04 -0400
committerZach DeCook <zachdecook@librem.one>2021-04-26 07:54:04 -0400
commit2ac94408df2d2124f1012813bcf37b219006f03d (patch)
treed82f43f8bee888b99f2d5e2e2ce781b231d73dc4
parente283c7c96d11c6e51fea5e1db896ac47edf0b806 (diff)
downloadusfm2gmi-2ac94408df2d2124f1012813bcf37b219006f03d.tar.gz
usx2gmi: fix parsing text which follows a node
-rwxr-xr-xusx2gmi.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/usx2gmi.py b/usx2gmi.py
index cc7709d..683d515 100755
--- a/usx2gmi.py
+++ b/usx2gmi.py
@@ -25,9 +25,15 @@ def convertBlock(thing):
 
 def convertInline(thing):
     # TODO: Implement this.
+    out = ''
     if thing.text:
-        return thing.text.replace("\n"," ").strip()
-    return ''
+        out = thing.text.replace("\n"," ").strip()
+    for t in thing:
+        out += convertInline(t)
+        if t.tail:
+          out += t.tail.replace("\n"," ")
+
+    return out
 
 if __name__ == '__main__':
     main(sys.argv)