mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Support Qt.TextFormat.MarkdownText in aqt.utils (#2675)
This commit is contained in:
parent
f78c59176e
commit
9d6e819701
1 changed files with 3 additions and 1 deletions
|
@ -81,7 +81,7 @@ from aqt.qt import (
|
|||
from aqt.theme import theme_manager
|
||||
|
||||
if TYPE_CHECKING:
|
||||
TextFormat = Literal["plain", "rich"]
|
||||
TextFormat = Literal["plain", "rich", "markdown"]
|
||||
|
||||
|
||||
def aqt_data_path() -> Path:
|
||||
|
@ -283,6 +283,8 @@ def showInfo(
|
|||
mb.setTextFormat(Qt.TextFormat.PlainText)
|
||||
elif textFormat == "rich":
|
||||
mb.setTextFormat(Qt.TextFormat.RichText)
|
||||
elif textFormat == "markdown":
|
||||
mb.setTextFormat(Qt.TextFormat.MarkdownText)
|
||||
elif textFormat is not None:
|
||||
raise Exception("unexpected textFormat type")
|
||||
mb.setText(text)
|
||||
|
|
Loading…
Reference in a new issue