Apply hide scene/section regardless of format being filled in
This commit is contained in:
@@ -646,12 +646,15 @@ class Tokenizer(ABC):
|
|||||||
tFormat = self._fmtScene if isPlain else self._fmtHScene
|
tFormat = self._fmtScene if isPlain else self._fmtHScene
|
||||||
if self._isNovel:
|
if self._isNovel:
|
||||||
self._hFormatter.incScene()
|
self._hFormatter.incScene()
|
||||||
|
if sHide:
|
||||||
|
tText = ""
|
||||||
|
tType = self.T_EMPTY
|
||||||
|
else:
|
||||||
tText = self._hFormatter.apply(tFormat, tText, nHead)
|
tText = self._hFormatter.apply(tFormat, tText, nHead)
|
||||||
tStyle = self._sceneStyle
|
tStyle = self._sceneStyle
|
||||||
if tText == "":
|
if tText == "": # Empty Format
|
||||||
tType = self.T_EMPTY if self._noSep or sHide else self.T_SKIP
|
tType = self.T_EMPTY if self._noSep else self.T_SKIP
|
||||||
tStyle = self.A_NONE
|
elif tText == tFormat: # Static Format
|
||||||
elif tText == tFormat:
|
|
||||||
tText = "" if self._noSep else tText
|
tText = "" if self._noSep else tText
|
||||||
tType = self.T_EMPTY if self._noSep else self.T_SEP
|
tType = self.T_EMPTY if self._noSep else self.T_SEP
|
||||||
tStyle = self.A_NONE if self._noSep else self.A_CENTRE
|
tStyle = self.A_NONE if self._noSep else self.A_CENTRE
|
||||||
@@ -676,10 +679,14 @@ class Tokenizer(ABC):
|
|||||||
tType = self.T_HEAD4
|
tType = self.T_HEAD4
|
||||||
tStyle = self.A_NONE
|
tStyle = self.A_NONE
|
||||||
if self._isNovel:
|
if self._isNovel:
|
||||||
|
if self._hideSection:
|
||||||
|
tText = ""
|
||||||
|
tType = self.T_EMPTY
|
||||||
|
else:
|
||||||
tText = self._hFormatter.apply(self._fmtSection, tText, nHead)
|
tText = self._hFormatter.apply(self._fmtSection, tText, nHead)
|
||||||
if tText == "":
|
if tText == "": # Empty Format
|
||||||
tType = self.T_EMPTY if self._hideSection else self.T_SKIP
|
tType = self.T_SKIP
|
||||||
elif tText == self._fmtSection:
|
elif tText == self._fmtSection: # Static Format
|
||||||
tType = self.T_SEP
|
tType = self.T_SEP
|
||||||
tStyle = self.A_CENTRE
|
tStyle = self.A_CENTRE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user