Skip to content

Commit 62a39aa

Browse files
committed
more fixes
1 parent 340eed4 commit 62a39aa

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

machine/corpora/scripture_ref_usfm_parser_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def start_note(self, state: UsfmParserState, marker: str, caller: str, category:
116116

117117
def end_note(self, state: UsfmParserState, marker: str, closed: bool) -> None:
118118
self.end_note_text(state)
119-
self.end_embed(state, marker, "", closed)
119+
self.end_embed(state, marker, None, closed)
120120
self._in_embed = False
121121

122122
def start_embed(self, state: UsfmParserState, marker: str, caller: str, category: Optional[str]) -> None:

tests/corpora/test_update_usfm_parser_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ def test_get_usfm_verse_preserve_figures_and_references() -> None:
124124
target = update_usfm(rows)
125125
assert target is not None
126126
assert (
127-
'\\v 5 Fifth verse of the first chapter.\r\n\\li2 \\fig Figure 1|src="image1.png" size="col" ref="1:5"\\fig*\r\n\\v 6'
127+
'\\v 5 Fifth verse of the first chapter.\r\n\\li2 \\fig Figure 1|src="image1.png" size="col" ref="1:5"'
128+
+ "\\fig*\r\n\\v 6"
128129
in target
129130
)
130131
assert "\\r (Mark 1:2-3; Luke 4:5-6)\r\n" in target

tests/corpora/test_usfm_file_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def test_get_rows_include_markers() -> None:
200200
assert rows[12].text == "Chapter two, verse four."
201201

202202
assert scripture_ref(rows[13]) == ScriptureRef.parse("MAT 2:5", corpus.versification)
203-
assert rows[13].text == "Chapter two, verse five \\rq (MAT 3:1)\\rq*."
203+
assert rows[13].text == "Chapter two, verse five\\rq (MAT 3:1)\\rq*."
204204

205205
assert scripture_ref(rows[14]) == ScriptureRef.parse("MAT 2:6", corpus.versification)
206206
assert rows[14].text == 'Chapter two, verse \\w six|strong="12345" \\w*.'
@@ -223,7 +223,7 @@ def test_get_rows_include_markers_all_text() -> None:
223223
assert len(rows) == 47
224224

225225
assert scripture_ref(rows[2]) == ScriptureRef.parse("MAT 1:0/3:ip", corpus.versification)
226-
assert rows[2].text == "An introduction to Matthew with an empty comment\\fe + \\ft This is an endnote.\\fe*"
226+
assert rows[2].text == "An introduction to Matthew with an empty comment\\fe + \\ft \\fe*"
227227

228228
assert scripture_ref(rows[8]) == ScriptureRef.parse("MAT 1:1", corpus.versification)
229229
assert (

0 commit comments

Comments
 (0)