clang-tools
9.0.0
|
A structured string representation that could be converted to markdown or plaintext upon requrest. More...
#include <FormattedString.h>
Public Member Functions | |
void | appendText (std::string Text) |
Append plain text to the end of the string. More... | |
void | appendCodeBlock (std::string Code, std::string Language="cpp") |
Append a block of C++ code. More... | |
void | appendInlineCode (std::string Code) |
Append an inline block of C++ code. More... | |
std::string | renderAsMarkdown () const |
std::string | renderAsPlainText () const |
std::string | renderForTests () const |
A structured string representation that could be converted to markdown or plaintext upon requrest.
Definition at line 24 of file FormattedString.h.
void clang::clangd::FormattedString::appendCodeBlock | ( | std::string | Code, |
std::string | Language = "cpp" |
||
) |
Append a block of C++ code.
This translates to a ``` block in markdown. In a plain text representation, the code block will be surrounded by newlines.
Referenced by clang::clangd::HoverInfo::present().
void clang::clangd::FormattedString::appendInlineCode | ( | std::string | Code | ) |
Append an inline block of C++ code.
This translates to the ` block in markdown.
Referenced by clang::clangd::HoverInfo::present().
void clang::clangd::FormattedString::appendText | ( | std::string | Text | ) |
Append plain text to the end of the string.
Referenced by clang::clangd::HoverInfo::present().
std::string clang::clangd::FormattedString::renderAsMarkdown | ( | ) | const |
std::string clang::clangd::FormattedString::renderAsPlainText | ( | ) | const |
std::string clang::clangd::FormattedString::renderForTests | ( | ) | const |