Skip to content

Commit 3e0a217

Browse files
committed
LaridianPocketBible: Backports from newmodel
- Add support for dictionary links - No line breaks in interlinear
1 parent 90a0849 commit 3e0a217

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

biblemulticonverter/src/main/java/biblemulticonverter/format/LaridianPocketBible.java

+9-3
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ public void visitVerseSeparator() throws RuntimeException {
654654
@Override
655655
public void visitLineBreak(LineBreakKind kind) throws RuntimeException {
656656
ensureInParagraph();
657-
if (kind == LineBreakKind.PARAGRAPH)
657+
if (interlinearTypes != null || kind == LineBreakKind.PARAGRAPH)
658658
sb.append("</p>\n<p>");
659659
else
660660
sb.append("<br />");
@@ -692,8 +692,14 @@ else if (formatted.startsWith("H"))
692692
@Override
693693
public Visitor<RuntimeException> visitDictionaryEntry(String dictionary, String entry) throws RuntimeException {
694694
ensureInParagraph();
695-
System.out.println("WARNING: Skipping unsupported dictionary entry");
696-
suffixStack.add("");
695+
String target = System.getProperty("biblemulticonverter.dictionarytarget." + dictionary);
696+
if (target != null) {
697+
sb.append("<a href=\"" + target + entry + "\">");
698+
suffixStack.add("</a>");
699+
} else {
700+
System.out.println("WARNING: Skipping unsupported dictionary entry for " + dictionary);
701+
suffixStack.add("");
702+
}
697703
return this;
698704
}
699705

0 commit comments

Comments
 (0)