}
// Paragraphs are translated into markdown lines, not markdown paragraphs.
// Therefore it only has a single linebreak afterwards.
- OS << '\n';
+ // VSCode requires two spaces at the end of line to start a new one.
+ OS << " \n";
}
void Paragraph::renderPlainText(llvm::raw_ostream &OS) const {
D.addCodeBlock("test");
D.addParagraph().appendText("bar");
- const char ExpectedMarkdown[] = R"md(foo
+ const char ExpectedMarkdown[] = R"md(foo
```cpp
test
```
D.addParagraph().appendText("foo");
D.addSpacer();
D.addParagraph().appendText("bar");
- EXPECT_EQ(D.asMarkdown(), "foo\n\nbar");
+ EXPECT_EQ(D.asMarkdown(), "foo \n\nbar");
EXPECT_EQ(D.asPlainText(), "foo\n\nbar");
}
DeepDoc.addParagraph().appendText("baz");
EXPECT_EQ(L.asMarkdown(), R"md(- foo
- bar
-- foo
- baz
- - foo
- - baz
+- foo
+ baz
+ - foo
+ - baz
baz)md");
EXPECT_EQ(L.asPlainText(), R"pt(- foo
- bar
Inner.addParagraph().appendText("after");
EXPECT_EQ(L.asMarkdown(), R"md(- foo
- bar
-- foo
- baz
- - foo
- - baz
+- foo
+ baz
+ - foo
+ - baz
baz
after)md");