Skip to content

Commit dfea2e8

Browse files
committed
MyBibleZone: support noteasfootnote on export
This is the inverse of 5285171, see #92. Fixes #89
1 parent 2ae6419 commit dfea2e8

File tree

1 file changed

+7
-0
lines changed
  • biblemulticonverter-sqlite/src/main/java/biblemulticonverter/sqlite/format

1 file changed

+7
-0
lines changed

biblemulticonverter-sqlite/src/main/java/biblemulticonverter/sqlite/format/MyBibleZone.java

+7
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,8 @@ public Visitor<IOException> visitDictionaryEntry(String dictionary, String entry
10211021

10221022
private static class MyBibleVerseVisitor extends AbstractNoCSSVisitor<IOException> {
10231023

1024+
private final boolean noteAsFootnote = Boolean.getBoolean("mybiblezone.note.asfootnote");
1025+
10241026
private final StringBuilder builder;
10251027
private final List<String> suffixStack = new ArrayList<>();
10261028
private final Set<String> unsupportedFeatures;
@@ -1078,6 +1080,11 @@ public void visitText(String text) throws RuntimeException {
10781080

10791081
@Override
10801082
public Visitor<IOException> visitFootnote() throws RuntimeException {
1083+
if (noteAsFootnote) {
1084+
builder.append("<n>");
1085+
suffixStack.add("</n>");
1086+
return this;
1087+
}
10811088
lastFootnote++;
10821089
MyBibleHTMLVisitor fnv = new MyBibleHTMLVisitor(unsupportedFeatures, "in footnote");
10831090
footnotes.put("[" + lastFootnote + "]", fnv);

0 commit comments

Comments
 (0)