From d0ef5b137f364a99e7247d98b5c9a34f94a3149f Mon Sep 17 00:00:00 2001 From: Michal Novak Date: Sat, 17 Jan 2026 11:34:11 +0100 Subject: [PATCH] A potential bug - fixing the value of the `end` variable - the index of the text end - this should match with all the conditions where `end` is used - discovered while aligning FantasyCoref with its original texts - TODO: should be checked if the update doesn't violate processing of LitBank, for which the block was originally designed for --- udapi/block/read/addtext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udapi/block/read/addtext.py b/udapi/block/read/addtext.py index 040174be..4d0b7771 100644 --- a/udapi/block/read/addtext.py +++ b/udapi/block/read/addtext.py @@ -32,7 +32,7 @@ def process_document(self, document): self.finished = True return text = ''.join(self.filehandle.readlines()) - i, end, was_newpar = 0, len(text), True + i, end, was_newpar = 0, len(text)-1, True while i <= end and text[i].isspace(): i += 1