From a3e7f46093c6ef9b72ca00249e41f542d06de6ce Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Mon, 26 Apr 2021 08:15:15 -0400 Subject: usx2gmi: put notes in brackets --- usx2gmi.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usx2gmi.py') 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 -- cgit 1.4.1