Skip to content

Commit 708fc2f

Browse files
committed
LogosHTML: Improve export of image hyperlinks
1 parent c670ca6 commit 708fc2f

File tree

1 file changed

+11
-0
lines changed
  • biblemulticonverter-logos/src/main/java/biblemulticonverter/logos/format

1 file changed

+11
-0
lines changed

biblemulticonverter-logos/src/main/java/biblemulticonverter/logos/format/LogosHTML.java

+11
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import biblemulticonverter.data.FormattedText.ExtendedLineBreakKind;
3232
import biblemulticonverter.data.FormattedText.ExtraAttributePriority;
3333
import biblemulticonverter.data.FormattedText.FormattingInstructionKind;
34+
import biblemulticonverter.data.FormattedText.HyperlinkType;
3435
import biblemulticonverter.data.FormattedText.Visitor;
3536
import biblemulticonverter.data.FormattedText.VisitorAdapter;
3637
import biblemulticonverter.data.MetadataBook;
@@ -996,6 +997,16 @@ public Visitor<IOException> visitSpeaker(String labelOrStrongs) throws IOExcepti
996997
return this;
997998
}
998999

1000+
@Override
1001+
public Visitor<IOException> visitHyperlink(HyperlinkType type, String target) throws IOException {
1002+
if (type == HyperlinkType.IMAGE) {
1003+
prepareForInlineOutput(false);
1004+
pushSuffix("<br /><img src=\"" + target + "\">");
1005+
return this;
1006+
}
1007+
return super.visitHyperlink(type, target);
1008+
}
1009+
9991010
@Override
10001011
public Visitor<IOException> visitExtraAttribute(ExtraAttributePriority prio, String category, String key, String value) throws IOException {
10011012
if (prio == ExtraAttributePriority.KEEP_CONTENT && category.equals("logos") && key.equals("chapter-range")) {

0 commit comments

Comments
 (0)