summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-04-19 01:24:05 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-04-20 21:08:32 +0200
commit51a348b2e24544f4d42aee10824c98df59062edc (patch)
treec7bae456ae30e99335500afb43cfa9c358517d0c /tests
parent0fcd782bd3690867f19420270bcc329325f04424 (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 'tests')
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md4
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/data/listsAndCodeBlocks.md6
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md b/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md
index 6336d0219f..702ccef134 100644
--- a/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md
+++ b/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md
@@ -20,7 +20,7 @@ MacFarlane writes:
> equivalent sample of Markdown. Here is a sample of AsciiDoc from the AsciiDoc
> manual:
-> ``` AsciiDoc
+> ```AsciiDoc
> 1. List item one.
> +
> List item one continued with a second paragraph followed by an
@@ -50,7 +50,7 @@ Now let's have an indented code block:
}
and end with a fenced code block:
-~~~ pseudocode
+~~~pseudocode
#include <something.h>
#include <else.h>
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/data/listsAndCodeBlocks.md b/tests/auto/gui/text/qtextmarkdownwriter/data/listsAndCodeBlocks.md
index c65e01408b..54e3f25afa 100644
--- a/tests/auto/gui/text/qtextmarkdownwriter/data/listsAndCodeBlocks.md
+++ b/tests/auto/gui/text/qtextmarkdownwriter/data/listsAndCodeBlocks.md
@@ -1,6 +1,6 @@
- something happens in the debugger like this:
- ```
+ ```
1 QQuickEventPoint::setGrabberItem qquickevents.cpp 869 0x7ffff7a963f2
2 QQuickItem::grabMouse qquickitem.cpp 7599 0x7ffff7abea29
3 QQuickWindowPrivate::deliverMatchingPointsToItem qquickwindow.cpp 2738 0x7ffff7aea34c
@@ -16,8 +16,8 @@
- something I tried to fix it:
- ```
- code goes here, probably c++
+ ```c++
+ item->ungrab();
```
- still didn't fix it, expecting a breakthrough any day now
- some sort of miracle
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp b/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp
index 84cf237ccc..13449299cb 100644
--- a/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp
+++ b/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp
@@ -432,7 +432,7 @@ void tst_QTextMarkdownWriter::fromHtml_data()
"![foo](/url \"title\")\n\n";
QTest::newRow("code") <<
"<pre class=\"language-pseudocode\">\n#include \"foo.h\"\n\nblock {\n statement();\n}\n\n</pre>" <<
- "``` pseudocode\n#include \"foo.h\"\n\nblock {\n statement();\n}\n```\n\n";
+ "```pseudocode\n#include \"foo.h\"\n\nblock {\n statement();\n}\n```\n\n";
// TODO
// QTest::newRow("escaped number and paren after double newline") <<
// "<p>(The first sentence of this paragraph is a line, the next paragraph has a number</p>13) but that's not part of an ordered list" <<