Skip to content

Commit

Permalink
Update how tables with URIs in them are parsed
Browse files Browse the repository at this point in the history
Resolves #574
  • Loading branch information
tychonievich committed Feb 4, 2025
1 parent fb25aff commit 9b4679f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/uri-def.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ def find_descriptions(txt, g7, ssp):
if header.startswith('Fam'): pfx = 'FAM-'
if header.startswith('Indi'): pfx = 'INDI-'
for tag, name, desc in re.findall(r'`([A-Z_0-9]+)` *\| *([^|\n]*?) *\| *([^|\n]*[^ |\n]) *', table.group(2)):
if '<br' in name: name = name[:name.find('<br')]
if '<br' in name:
tag = name[name.find('`g7:')+4:name.rfind('`')]
name = name[:name.find('<br')]
if tag not in g7: tag = pfx+tag
if tag not in g7:
raise Exception('Found table for '+tag+' but no section or structure')
Expand Down

0 comments on commit 9b4679f

Please sign in to comment.