~earboxer/usfm2gmi

e283c7c96d11c6e51fea5e1db896ac47edf0b806 — Zach DeCook 3 months ago 726dd0d
divine name: use another tag for this
1 files changed, 3 insertions(+), 3 deletions(-)

M usfm2gmi.py
M usfm2gmi.py => usfm2gmi.py +3 -3
@@ 35,7 35,7 @@ def superscript(word):
def convert(line):
  """Convert a string to a list of tuples, each a token"""
  # TODO: preserve the lack of whitespace before a backslash.
  split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').replace('\\w*','\\w* ').split()
  split = line.replace('\\', ' \\').replace('\\nd*','\\nd* ').replace('\\+nd*','\\+nd* ').replace('\\f*','\\f* ').replace('\\wj*','\\wj* ').replace('\\w*','\\w* ').split()
  out = ''
  nd = False
  if len(split) == 0:


@@ 79,9 79,9 @@ def convert(line):
      out += '*'
    elif word in ['\\em*', '\\it*']:
      out = out.rstrip() + '*'
    elif word == '\\nd':
    elif word in ['\\nd','\\+nd']:
      nd = True
    elif word == '\\nd*':
    elif word in ['\\nd*','\\+nd*']:
      nd = False
    # Footnotes (https://ubsicap.github.io/usfm/notes_basic/fnotes.html)
    elif word == '\\f':