Closed amine-aboufirass closed 2 years ago
The way that glossary elements are being detected is not sufficiently robust. Currently there are two nested if
statements:
elif isinstance(elem, pf.Div):
if "glossary" in elem.classes
Considering the fact that Div
elements will also contain Table
elements, the outermost condition is too general. Something like this might be better:
elif isinstance(elem, pf.Div) and isinstance(elem.content[0], pf.DefinitionList):
if "glossary" in elem.classes:
#...
elif "abbrv" in elem.classes:
#...
Done