Add markdown highlight format

This commit is contained in:
Veronica Berglyd Olsen
2025-06-16 18:46:37 +02:00
parent 1c150e0011
commit 148fc68590
8 changed files with 45 additions and 11 deletions
+5
View File
@@ -919,6 +919,11 @@ def testFmtToken_ExtractFormats(mockGUI):
assert text == "Text with strikethrough in it."
assert fmt == [(10, TextFmt.D_B, ""), (23, TextFmt.D_E, "")]
# Plain mark
text, fmt = tokens._extractFormats("Text with ==a highlight== in it.")
assert text == "Text with a highlight in it."
assert fmt == [(10, TextFmt.M_B, ""), (21, TextFmt.M_E, "")]
# Nested bold/italics
text, fmt = tokens._extractFormats("Text with **bold and _italics_** in it.")
assert text == "Text with bold and italics in it."