Remove document size constraint

This commit is contained in:
Veronica Berglyd Olsen committed 2023-09-06 20:35:48 +02:00
1 parent 0ef46ef0ea
commit 915b9da5d0
6 files changed
+93 -161

No files matched your search

+1 -9
View File
@@ -38,7 +38,7 @@ from PyQt5.QtCore import QCoreApplication, QRegularExpression
from novelwriter.enum import nwItemLayout
from novelwriter.common import formatTimeStamp, numberToRoman, checkInt
from novelwriter.constants import nwConst, nwHeadFmt, nwRegEx, nwUnicode
from novelwriter.constants import nwHeadFmt, nwRegEx, nwUnicode
from novelwriter.core.project import NWProject
logger = logging.getLogger(__name__)
@@ -349,14 +349,6 @@ class Tokenizer(ABC):
self._text = text
docSize = len(self._text)
if docSize > nwConst.MAX_DOCSIZE:
errVal = self.tr("Document '{0}' is too big ({1} MB). Skipping.").format(
self._nwItem.itemName, f"{docSize/1.0e6:.2f}"
)
self._text = "# {0}\n\n{1}\n\n".format(self.tr("ERROR"), errVal)
self._errData.append(errVal)
self._isNone = self._nwItem.itemLayout == nwItemLayout.NO_LAYOUT
self._isNovel = self._nwItem.itemLayout == nwItemLayout.DOCUMENT
self._isNote = self._nwItem.itemLayout == nwItemLayout.NOTE