Tokenize dialogue with colour tag

This commit is contained in:
Veronica Berglyd Olsen
2024-10-22 18:41:34 +02:00
parent c537d0f396
commit 63f9cd0bac
13 changed files with 107 additions and 146 deletions
+2 -2
View File
@@ -248,7 +248,7 @@ def testFmtToOdt_DialogueFormatting(mockGUI):
# Regular dialogue
text = "Text with 'dialogue in it.'"
fmt = [(10, TextFmt.DL_B, ""), (27, TextFmt.DL_E, "")]
fmt = [(10, TextFmt.COL_B, "dialog"), (27, TextFmt.COL_E, "")]
xTest = ET.Element(_mkTag("office", "text"))
odt._addTextPar(xTest, "Standard", oStyle, text, tFmt=fmt)
assert odt.errData == []
@@ -261,7 +261,7 @@ def testFmtToOdt_DialogueFormatting(mockGUI):
# Alternative dialogue
text = "Text with ::dialogue in it.::"
fmt = [(10, TextFmt.ADL_B, ""), (29, TextFmt.ADL_E, "")]
fmt = [(10, TextFmt.COL_B, "altdialog"), (29, TextFmt.COL_E, "")]
xTest = ET.Element(_mkTag("office", "text"))
odt._addTextPar(xTest, "Standard", oStyle, text, tFmt=fmt)
assert odt.errData == []