Skip to content

Commit

Permalink
LogosHTML: Fix handling of Strongs without text
Browse files Browse the repository at this point in the history
When a Strongs number is not associated to any text (which is a
validation error but happens for some input formats), and there are more
than 10 nested hyperlinks, LogosHTML created an output file that could
not be parsed by the nested hyperlinks postprocessor after convertion to
DOCX.

Fix it by also allow empty elements in GrammarHackVisitor.
  • Loading branch information
schierlm committed Dec 22, 2023
1 parent d978f10 commit bdd0ed2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ public GrammarHackVisitor(Visitor<IOException> nextVisitor, Writer writer, Strin
public int visitElementTypes(String elementTypes) throws IOException {
if (elementTypes == null)
return 1;
if (elementTypes.equals("t")) {
if (elementTypes.equals("t") || elementTypes.isEmpty()) {
// only text, let's use our alternative Strings
writer.write(altPrefix);
suffix = altSuffix;
Expand Down

0 comments on commit bdd0ed2

Please sign in to comment.