diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-04-26 08:29:07 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-05-08 20:28:37 +0000 |
commit | 76716c4a9adc3f9aeb251d3ebe4d1d0be38b97ee (patch) | |
tree | 417bbd65fe3911d2ffddef20f05f15bb023f7d7d /src/gui/text/qtextmarkdownwriter.cpp | |
parent | 040dd7fe26bfa34aae19e2db698ff0d69346ed56 (diff) |
Markdown: deal with horizontal rules (thematic breaks)
Change-Id: I14d4bcfe1a6c3bd87d1328f0abb81b2138545e4e
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/gui/text/qtextmarkdownwriter.cpp')
-rw-r--r-- | src/gui/text/qtextmarkdownwriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qtextmarkdownwriter.cpp b/src/gui/text/qtextmarkdownwriter.cpp index 2f4c8587ad..0634d324b1 100644 --- a/src/gui/text/qtextmarkdownwriter.cpp +++ b/src/gui/text/qtextmarkdownwriter.cpp @@ -309,6 +309,9 @@ int QTextMarkdownWriter::writeBlock(const QTextBlock &block, bool wrap, bool ign prefix += QLatin1String(bullet) + Space; } m_stream << prefix; + } else if (block.blockFormat().hasProperty(QTextFormat::BlockTrailingHorizontalRulerWidth)) { + m_stream << "- - -\n"; // unambiguous horizontal rule, not an underline under a heading + return 0; } else if (!block.blockFormat().indent()) { m_wrappedLineIndent = 0; } |