From 76716c4a9adc3f9aeb251d3ebe4d1d0be38b97ee Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 26 Apr 2019 08:29:07 +0200 Subject: Markdown: deal with horizontal rules (thematic breaks) Change-Id: I14d4bcfe1a6c3bd87d1328f0abb81b2138545e4e Reviewed-by: Gatis Paeglis --- src/gui/text/qtextmarkdownwriter.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/text/qtextmarkdownwriter.cpp') 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; } -- cgit v1.2.3