diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-03 20:51:57 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-11-07 09:35:11 +0100 |
commit | f5c7799f59ba53c634906b11e2135190093bf87b (patch) | |
tree | c170f7ed71df77a3d8baebfb225c9179e58f72bb /src/gui/text/qtextdocument.h | |
parent | 2106a625e8fa3eabfe2f3a774baacc898c763b44 (diff) |
Support the markdown underline extension
MarkdownDialectGitHub now includes this feature, so *emph* is italicized
and _emph_ is underlined. This is a better fit for QTextDocument capabilities;
until now, _underlined_ markdown could be read, but would be rendered with
italics, because in CommonMark, *emphasis* and _emphasis_ are the same.
But QTextMarkdownWriter already writes underlining and italics distinctly
in this way.
[ChangeLog][QtGui][Text] By default (with MarkdownDialectGitHub), markdown
_underline_ and *italic* text styles are now distinct.
Fixes: QTBUG-84429
Change-Id: Ifc6defa4852abe831949baa4ce28bae5f1a82265
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/text/qtextdocument.h')
-rw-r--r-- | src/gui/text/qtextdocument.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h index 0470ad52e9..23fffc4771 100644 --- a/src/gui/text/qtextdocument.h +++ b/src/gui/text/qtextdocument.h @@ -151,7 +151,7 @@ public: enum MarkdownFeature { MarkdownNoHTML = 0x0020 | 0x0040, MarkdownDialectCommonMark = 0, - MarkdownDialectGitHub = 0x0004 | 0x0008 | 0x0400 | 0x0100 | 0x0200 | 0x0800 + MarkdownDialectGitHub = 0x0004 | 0x0008 | 0x0400 | 0x0100 | 0x0200 | 0x0800 | 0x4000 }; Q_DECLARE_FLAGS(MarkdownFeatures, MarkdownFeature) Q_FLAG(MarkdownFeatures) |