Resolve HTML render bug (#951)
* Fix bug breaking HTML rendering with angle brackets in other blocks than normal text * Restore cursor if document viewer fails to load * Improve test coverage
This commit is contained in:
committed by
GitHub
parent
59e10fbf0a
commit
9be2519406
@@ -417,6 +417,27 @@ def testCoreToHtml_SpecialCases(mockGUI):
|
||||
"<p>Test > text <em><<strong>bold</strong>></em> and more.</p>\n"
|
||||
)
|
||||
|
||||
# Test for bug #950
|
||||
# =================
|
||||
# See: https://github.com/vkbo/novelWriter/issues/950
|
||||
|
||||
theHtml.setComments(True)
|
||||
theHtml._theText = "% Test > text _<**bold**>_ and more.\n"
|
||||
theHtml.tokenizeText()
|
||||
theHtml.doConvert()
|
||||
assert theHtml.theResult == (
|
||||
"<p class='comment'>"
|
||||
"<strong>Comment:</strong> Test > text _<**bold**>_ and more."
|
||||
"</p>\n"
|
||||
)
|
||||
|
||||
theHtml._theText = "## Heading <1>\n"
|
||||
theHtml.tokenizeText()
|
||||
theHtml.doConvert()
|
||||
assert theHtml.theResult == (
|
||||
"<h1 style='page-break-before: always;'>Heading <1></h1>\n"
|
||||
)
|
||||
|
||||
# END Test testCoreToHtml_SpecialCases
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user