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/qtextmarkdownimporter_p.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/qtextmarkdownimporter_p.h')
-rw-r--r-- | src/gui/text/qtextmarkdownimporter_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qtextmarkdownimporter_p.h b/src/gui/text/qtextmarkdownimporter_p.h index c05ac68820..12a7c5a3a6 100644 --- a/src/gui/text/qtextmarkdownimporter_p.h +++ b/src/gui/text/qtextmarkdownimporter_p.h @@ -80,6 +80,7 @@ public: FeatureStrikeThrough = 0x0200, FeaturePermissiveWWWAutoLinks = 0x0400, FeatureTasklists = 0x0800, + FeatureUnderline = 0x4000, // composite flags FeaturePermissiveAutoLinks = FeaturePermissiveMailAutoLinks | FeaturePermissiveURLAutoLinks | FeaturePermissiveWWWAutoLinks, |