Skip to content

Commit

Permalink
LogosHTML: Add different nested hyperlinks options
Browse files Browse the repository at this point in the history
They allegedly work better when using MS Word for converting from HTML
to .docx. (Note that MS Word is not officially supported for this, so if
your conversion breaks in some other way, you have to keep both parts!)
  • Loading branch information
schierlm committed Jan 15, 2024
1 parent a43bc69 commit ed27e77
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ public class LogosHTML implements ExportFormat {
private String lineSeparator;
private Map<String, List<ExtraLinkRule>> extraLinkRules;

private boolean wordNestedHyperlinks = Boolean.getBoolean("biblemulticonverter.logos.nestedhyperlinks.word");

@Override
public void doExport(Bible bible, String... exportArgs) throws Exception {
String versemap = exportArgs.length == 1 ? "Bible" : exportArgs[1];
Expand Down Expand Up @@ -889,7 +891,7 @@ else if (expandedStrongs[i].charAt(0) == 'H')
if (suffixStack.size() == 2 && suffixStack.get(1).equals("</span>")) {
stackProblem = false;
}
if (grammarCounter < 10 || stackProblem) {
if (grammarCounter < 10 || stackProblem || wordNestedHyperlinks) {
writer.write(prefix);
pushSuffix(suffix.toString());
} else {
Expand Down

0 comments on commit ed27e77

Please sign in to comment.