diff options
| author | Kadir Cetinkaya <kadircet@google.com> | 2019-12-11 19:14:15 +0100 |
|---|---|---|
| committer | Kadir Cetinkaya <kadircet@google.com> | 2019-12-13 09:58:55 +0100 |
| commit | 7c13fe8a6a643497d49036e6ea368e1adb06f57e (patch) | |
| tree | fff3344139fc399986db128030cbc6d1dc320ea2 /clang-tools-extra/clangd/FormattedString.h | |
| parent | 597c6b65552a777a40f2afed07c543f6789318b1 (diff) | |
| download | bcm5719-llvm-7c13fe8a6a643497d49036e6ea368e1adb06f57e.tar.gz bcm5719-llvm-7c13fe8a6a643497d49036e6ea368e1adb06f57e.zip | |
[clangd] Introduce codeblocks
Summary: Follow-up to the patch D71248
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71414
Diffstat (limited to 'clang-tools-extra/clangd/FormattedString.h')
| -rw-r--r-- | clang-tools-extra/clangd/FormattedString.h | 3 |
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; |

