Improve handling of page breaks (#916)

* Remove page break from title and always allow for partition and chapter
* Move strip of format string into the Tokenizer class
* Fix page breaks in HTML for skip and sep
* Update documentation
* Update tests
* Allow page breaks before scene and section headers
* Never hide the scene header and instead default to skip line
This commit is contained in:
Veronica Berglyd Olsen
2021-10-24 22:09:41 +02:00
committed by GitHub
parent da2685131d
commit 299cde9cdf
12 changed files with 94 additions and 76 deletions
+2 -3
View File
@@ -63,7 +63,6 @@ class ToHtml(Tokenizer):
self.doKeywords = True
self.doComments = doComments
self.doSynopsis = doSynopsis
return
def setStyles(self, cssStyles):
@@ -230,10 +229,10 @@ class ToHtml(Tokenizer):
tmpResult.append(f"<{h4}{hStyle}>{aNm}{tHead}</{h4}>\n")
elif tType == self.T_SEP:
tmpResult.append(f"<p class='sep'>{tText}</p>\n")
tmpResult.append(f"<p class='sep'{hStyle}>{tText}</p>\n")
elif tType == self.T_SKIP:
tmpResult.append("<p class='skip'>&nbsp;</p>\n")
tmpResult.append(f"<p class='skip'{hStyle}>&nbsp;</p>\n")
elif tType == self.T_TEXT:
tTemp = tText