Use the quick read feature wherever we only need document text

This commit is contained in:
Veronica Berglyd Olsen
2024-03-26 11:56:31 +01:00
parent 738f022212
commit 6a7262b817
7 changed files with 22 additions and 58 deletions
+1 -3
View File
@@ -429,9 +429,7 @@ class Tokenizer(ABC):
self._text = ""
self._handle = None
if nwItem := self._project.tree[tHandle]:
if text is None:
text = self._project.storage.getDocument(tHandle).readDocument() or ""
self._text = text
self._text = text or self._project.storage.getDocumentText(tHandle)
self._handle = tHandle
self._isNovel = nwItem.itemLayout == nwItemLayout.DOCUMENT
return