Process field values in QTextDocuments
This commit is contained in:
@@ -315,7 +315,7 @@ def testFmtToHtml_ConvertParagraphs(mockGUI):
|
||||
"or two<sup>ERR</sup> footnotes.</p>\n"
|
||||
)
|
||||
|
||||
html.appendFootnotes()
|
||||
html.closeDocument()
|
||||
assert html._pages[-2] == (
|
||||
"<p>Text with one<sup><a href='#footnote_1'>1</a></sup> "
|
||||
"or two<sup>ERR</sup> footnotes.</p>\n"
|
||||
|
||||
@@ -44,6 +44,9 @@ class BareTokenizer(Tokenizer):
|
||||
def doConvert(self):
|
||||
super().doConvert() # type: ignore (deliberate check)
|
||||
|
||||
def closeDocument(self):
|
||||
super().doConvert() # type: ignore (deliberate check)
|
||||
|
||||
def saveDocument(self, path) -> None:
|
||||
super().saveDocument(path) # type: ignore (deliberate check)
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ def testFmtToMarkdown_ConvertParagraphs(mockGUI):
|
||||
md.doConvert()
|
||||
assert md._pages[-1] == "Text with one[1] or two[ERR] footnotes.\n\n"
|
||||
|
||||
md.appendFootnotes()
|
||||
md.closeDocument()
|
||||
assert md._pages[-2] == (
|
||||
"Text with one[1] or two[ERR] footnotes.\n\n"
|
||||
)
|
||||
|
||||
@@ -594,7 +594,7 @@ def testFmtToQTextDocument_Footnotes(mockGUI):
|
||||
)
|
||||
doc.tokenizeText()
|
||||
doc.doConvert()
|
||||
doc.appendFootnotes()
|
||||
doc.closeDocument()
|
||||
assert doc.document.blockCount() == 4
|
||||
|
||||
# 0: Scene
|
||||
|
||||
Reference in New Issue
Block a user