Preserve MEV passage metadata
This commit is contained in:
@@ -93,6 +93,8 @@ JHN 8 33 0 paragraph 0 They answered Him.
|
||||
JHN 8 39 0 paragraph 0 They answered Him, "Abraham is our father."
|
||||
JHN 8 39 1 paragraph 0 Jesus said to them, "If you were Abraham's children,
|
||||
JHN 8 40 0 same 0 you would do the works of Abraham."
|
||||
JHN 8 41 0 paragraph 0 You shall be free'
|
||||
JHN 8 41 1 same 0 ?
|
||||
HEB 4 7 0 paragraph 0 again He establishes a certain day:
|
||||
HEB 4 7 1 line 0 "Today, if you will hear His voice,
|
||||
HEB 4 7 2 line 1 do not harden your hearts."
|
||||
@@ -137,12 +139,26 @@ HEB 4 7 2 line 1 do not harden your hearts."
|
||||
"Jesus said to them, \"If you were Abraham's children, " &
|
||||
"[40] you would do the works of Abraham.\""
|
||||
|
||||
test "joins punctuation-only segments without extra spacing":
|
||||
let passages = embedded_bible.fetchPassages(layoutRows, "John 8:41", "TEST")
|
||||
|
||||
check passages[0] == "John 8:41\n [41] You shall be free'?"
|
||||
|
||||
test "supports legacy verse rows":
|
||||
const legacyRows = "JHN\t3\t16\tFor God so loved the world.\n"
|
||||
let passages = embedded_bible.fetchPassages(legacyRows, "John 3:16", "TEST")
|
||||
|
||||
check passages[0] == "John 3:16\n [16] For God so loved the world."
|
||||
|
||||
test "ignores layout metadata while rendering":
|
||||
const metadataRows =
|
||||
"JHN\t8\t31\t0\tparagraph\t0\tJesus said.\t" &
|
||||
"""{"wordsOfChrist":true,"annotations":[{"kind":"crossReference","marker":"a","href":"index_split_1.html#x","offset":6}]}""" &
|
||||
"\n"
|
||||
let passages = embedded_bible.fetchPassages(metadataRows, "John 8:31", "TEST")
|
||||
|
||||
check passages[0] == "John 8:31\n [31] Jesus said."
|
||||
|
||||
test "groups legacy rows into paragraphs using pilcrows":
|
||||
const legacyRows =
|
||||
"JHN\t8\t31\tThen Jesus said.\n" &
|
||||
|
||||
Reference in New Issue
Block a user