summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/FormattedString.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/FormattedString.h')
-rw-r--r--clang-tools-extra/clangd/FormattedString.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/FormattedString.h b/clang-tools-extra/clangd/FormattedString.h
index 02753950f0c..4ded2fdee31 100644
--- a/clang-tools-extra/clangd/FormattedString.h
+++ b/clang-tools-extra/clangd/FormattedString.h
@@ -70,6 +70,9 @@ public:
Paragraph &addParagraph();
/// Inserts a vertical space into the document.
void addSpacer();
+ /// Adds a block of code. This translates to a ``` block in markdown. In plain
+ /// text representation, the code block will be surrounded by newlines.
+ void addCodeBlock(std::string Code, std::string Language = "cpp");
std::string asMarkdown() const;
std::string asPlainText() const;
OpenPOWER on IntegriCloud