From fd4f94371b9786b53a8add449c9fb674fdc91f13 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Wed, 31 Mar 2021 09:03:19 -0400 Subject: Punctuation: Make more spacing more natural --- usfm2gmi.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'usfm2gmi.py') diff --git a/usfm2gmi.py b/usfm2gmi.py index 43a8c87..d47546a 100755 --- a/usfm2gmi.py +++ b/usfm2gmi.py @@ -98,7 +98,15 @@ def convert(line): continue elif '|strong="' in word: spl = word.split('|') - out += spl[0] + superscript(spl[1][8:-1]) + ' ' + out += spl[0] + ' ' #superscript(spl[1][8:-1]) + ' ' + # Remove those extra spaces that sneak in. + elif word in [',', '.', ';', '”', ',”', ')']: + if out[-1] == ' ': + out = out[:-1] + word + ' ' + else: + out += word + ' ' + elif word in ['“', '(']: + out += word else: if nd: out += smallcaps(word) + ' ' -- cgit 1.4.1