diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-04-19 01:24:05 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-04-20 21:08:32 +0200 |
commit | 51a348b2e24544f4d42aee10824c98df59062edc (patch) | |
tree | c7bae456ae30e99335500afb43cfa9c358517d0c /src/gui | |
parent | 0fcd782bd3690867f19420270bcc329325f04424 (diff) |
Markdown writer: omit space after opening code block fence
The CommonMark spec shows that it's not necessary to have a space
between the code fence and the language string:
https://spec.commonmark.org/0.29/#example-112
This also avoids a needless trailing space after a code fence that
does not include a language string.
Change-Id: I2addd38a196045a7442150760b73269bfe4ffb22
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qtextmarkdownwriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextmarkdownwriter.cpp b/src/gui/text/qtextmarkdownwriter.cpp index 1788999855..ae63fcb4dd 100644 --- a/src/gui/text/qtextmarkdownwriter.cpp +++ b/src/gui/text/qtextmarkdownwriter.cpp @@ -447,7 +447,7 @@ int QTextMarkdownWriter::writeBlock(const QTextBlock &block, bool wrap, bool ign m_codeBlockFence = QString(3, fenceChar.at(0)); // A block quote can contain an indented code block, but not vice-versa. m_stream << m_linePrefix << QString(m_wrappedLineIndent, Space) << m_codeBlockFence - << Space << blockFmt.stringProperty(QTextFormat::BlockCodeLanguage) << Newline; + << blockFmt.stringProperty(QTextFormat::BlockCodeLanguage) << Newline; m_fencedCodeBlock = true; } wrap = false; |