about summary refs log tree commit diff
path: root/usfm2gmi.py
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2023-12-12 00:58:40 +0000
committerZach DeCook <zachdecook@librem.one>2023-12-12 00:58:40 +0000
commita9e497dbee245754bceed9bc773485309986845e (patch)
treeee94c029d7ca26df291580b20dd541b3f8160224 /usfm2gmi.py
parent457f85f6ac9243dd94519f8502044729f25f19d4 (diff)
downloadusfm2gmi-a9e497dbee245754bceed9bc773485309986845e.tar.gz
enable superscript tag
Diffstat (limited to 'usfm2gmi.py')
-rwxr-xr-xusfm2gmi.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/usfm2gmi.py b/usfm2gmi.py
index 5d52808..6865ac4 100755
--- a/usfm2gmi.py
+++ b/usfm2gmi.py
@@ -38,6 +38,7 @@ def convert(line, printStrongs=False):
   split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\+nd*','\\+nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').replace('\\w*',' \\w* ').replace('\\+w*', '\\+w* ').split()
   out = ''
   nd = False
+  superS = False
   if len(split) == 0:
     return out
   elif split[0] in ['\\mt1','\\mt','\\ms','\\h']:
@@ -111,6 +112,10 @@ def convert(line, printStrongs=False):
       continue
     elif word in ['\\nb']:
       continue
+    elif word == '\\+sup':
+      superS = True
+    elif word == '\\+sup*':
+      superS = False
     elif '|strong="' in word:
       spl = word.split('|')
       out += spl[0]
@@ -130,6 +135,8 @@ def convert(line, printStrongs=False):
     else:
      if nd:
       out += smallcaps(word) + ' '
+     if superS:
+      out += superscript(word) + ' '
      else:
       out += word + ' '
   return out