clang-tools
10.0.0
|
A format-agnostic representation for structured text. More...
#include <FormattedString.h>
Public Member Functions | |
Paragraph & | addParagraph () |
Adds a semantical block that will be separate from others. More... | |
void | addRuler () |
Inserts a horizontal separator to the document. More... | |
void | addCodeBlock (std::string Code, std::string Language="cpp") |
Adds a block of code. More... | |
Paragraph & | addHeading (size_t Level) |
Heading is a special type of paragraph that will be prepended with Level many '#'s in markdown. More... | |
BulletList & | addBulletList () |
std::string | asMarkdown () const |
Doesn't contain any trailing newlines. More... | |
std::string | asPlainText () const |
Doesn't contain any trailing newlines. More... | |
A format-agnostic representation for structured text.
Allows rendering into markdown and plaintext.
Definition at line 82 of file FormattedString.h.
BulletList& clang::clangd::markup::Document::addBulletList | ( | ) |
Referenced by clang::clangd::HoverInfo::present().
void clang::clangd::markup::Document::addCodeBlock | ( | std::string | Code, |
std::string | Language = "cpp" |
||
) |
Adds a block of code.
This translates to a ``` block in markdown. In plain text representation, the code block will be surrounded by newlines.
Paragraph& clang::clangd::markup::Document::addHeading | ( | size_t | Level | ) |
Heading is a special type of paragraph that will be prepended with Level
many '#'s in markdown.
Referenced by clang::clangd::HoverInfo::present().
Paragraph& clang::clangd::markup::Document::addParagraph | ( | ) |
Adds a semantical block that will be separate from others.
Referenced by clang::clangd::HoverInfo::present().
void clang::clangd::markup::Document::addRuler | ( | ) |
Inserts a horizontal separator to the document.
Referenced by clang::clangd::HoverInfo::present().
std::string clang::clangd::markup::Document::asMarkdown | ( | ) | const |
Doesn't contain any trailing newlines.
std::string clang::clangd::markup::Document::asPlainText | ( | ) | const |
Doesn't contain any trailing newlines.