Render embedded plain footnotes

This commit is contained in:
2026-07-05 22:16:40 -05:00
parent 457600b93d
commit 0139240073
6 changed files with 299 additions and 20 deletions
+34
View File
@@ -170,3 +170,37 @@ HEB 4 7 2 line 1 do not harden your hearts."
" [31] Then Jesus said. [32] You shall know the truth.\n" &
"\n" &
" [33] They answered Him."
test "plain output renders annotation footnotes":
const rows =
"JHN\t8\t1\t0\tparagraph\t0\tBut Jesus went to the Mount of Olives.\t" &
"""{"annotations":[{"kind":"crossReference","marker":"a","offset":40,"targetText":"Mt 21:1"}]}""" & "\n" &
"JHN\t8\t2\t0\tsame\t0\tEarly in the morning He returned to the temple.\t" &
"""{"annotations":[{"kind":"crossReference","marker":"a","offset":49,"targetText":"Mt 26:55; Lk 4:20"}]}""" & "\n"
let passages = embedded_bible.fetchPlainPassages(rows, "John 8:1-2", "TEST")
check passages[0] == "1 But Jesus went to the Mount of Olives.[a] 2 Early in the morning He\n" &
"returned to the temple.[b]\n" &
"\n" &
"a. Mt 21:1\n" &
"b. Mt 26:55; Lk 4:20\n" &
"\n" &
" John 8:1-2 (TEST)"
test "plain output resets footnote labels per chapter":
const rows =
"JHN\t8\t59\t0\tparagraph\t0\tThey took up stones.\t" &
"""{"annotations":[{"kind":"crossReference","marker":"a","offset":21,"targetText":"Lev 24:16"}]}""" & "\n" &
"JHN\t9\t1\t0\tparagraph\t0\tAs Jesus passed by.\t" &
"""{"annotations":[{"kind":"crossReference","marker":"a","offset":20,"targetText":"Jn 8:12"}]}""" & "\n"
let passages = embedded_bible.fetchPlainPassages(rows, "John 8:59-9:1", "TEST")
check passages[0] == "59 They took up stones.[a]\n" &
"\n" &
"a. Lev 24:16\n" &
"\n" &
"1 As Jesus passed by.[a]\n" &
"\n" &
"a. Jn 8:12\n" &
"\n" &
" John 8:59-9:1 (TEST)"