adyeths / u2o

USFM to OSIS bible format converter.
The Unlicense
18 stars 6 forks source link

Out of range error during postprocessing #101

Closed mmartin9684-sil closed 4 years ago

mmartin9684-sil commented 4 years ago

The postprocess method will throw an exception (line 2768, IndexError: list index out of range) if the last generated OSIS line matches ". When the script checks the content of the next generated line ('line[i + 1] == ""), it needs to check that there is a next line.

Sample USFM text: \id FRT - Achi de Cubulco NT [acrC] -Guatemala 2009 (DBL 2015) \toc1 I ʼUtz Laj Tzij Re I Dios \rem *** Title Page \mt1 I ʼUtz Laj Tzij Re I Dios \b \pc El Nuevo Testamento en el idioma Achí de Cubulco de Guatemala \pc [acrC] \b \pc Traducción: © 2009, Wycliffe Bible Translators, Inc. \b \pc Primera edición: 1984, Sociedad Bíblica Internacional \b \pc Segunda edición: 2009, Wycliffe Bible Translators \b \pc Edición para la Web \pc 2015, Wycliffe Bible Translators, Inc. \pc www.Wycliffe.org \b

adyeths commented 4 years ago

This is now fixed.

mmartin9684-sil commented 4 years ago

Fantastic, thanks!