From 04f01be7227cea94418b0c96292ba35d34d97fd0 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Thu, 8 Jul 2021 21:29:07 -0400 Subject: cross references: Put in parentheses --- usfm2gmi.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'usfm2gmi.py') diff --git a/usfm2gmi.py b/usfm2gmi.py index 7bfef3b..65a0f95 100755 --- a/usfm2gmi.py +++ b/usfm2gmi.py @@ -91,6 +91,16 @@ def convert(line): skip = 1 # verse reference not necessary for inline fn elif word == '\\f*': out += ']' + # Cross-references (https://ubsicap.github.io/usfm/notes_basic/xrefs.html) + elif word == '\\x': + out += '(' + skip = 1 # next character is xref caller + elif word == '\\xo': + skip = 1 # verse reference not necessary for inline xref + elif word in ['\\xt']: + continue + elif word == '\\x*': + out += ')' # TODO: support Endnotes (\fe and \fe*) elif word in ['\\ft']: continue # TODO: fancy formatting of more types -- cgit 1.4.1