Render embedded markdown footnotes
This commit is contained in:
@@ -204,3 +204,37 @@ HEB 4 7 2 line 1 do not harden your hearts."
|
||||
"a. Jn 8:12\n" &
|
||||
"\n" &
|
||||
"– John 8:59-9:1 (TEST)"
|
||||
|
||||
test "markdown output renders native 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.fetchMarkdownPassages(rows, "John 8:1-2", "TEST")
|
||||
|
||||
check passages[0] == "> **1** But Jesus went to the Mount of Olives.[^a] **2** Early in the\n" &
|
||||
"> morning He 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 "markdown output resets native footnotes 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.fetchMarkdownPassages(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)*"
|
||||
|
||||
Reference in New Issue
Block a user