clang-tools
11.0.0
|
Represents parts of the markup that can contain strings, like inline code, code block or plain text. More...
#include <Markup.h>
Public Member Functions | |
void | renderMarkdown (llvm::raw_ostream &OS) const override |
void | renderPlainText (llvm::raw_ostream &OS) const override |
std::unique_ptr< Block > | clone () const override |
Paragraph & | appendText (llvm::StringRef Text) |
Append plain text to the end of the string. More... | |
Paragraph & | appendCode (llvm::StringRef Code, bool Preserve=false) |
Append inline code, this translates to the ` block in markdown. More... | |
Paragraph & | appendSpace () |
Ensure there is space between the surrounding chunks. More... | |
![]() | |
std::string | asMarkdown () const |
std::string | asPlainText () const |
virtual bool | isRuler () const |
virtual | ~Block ()=default |
Represents parts of the markup that can contain strings, like inline code, code block or plain text.
One must introduce different paragraphs to create separate blocks.
Paragraph & clang::clangd::markup::Paragraph::appendCode | ( | llvm::StringRef | Code, |
bool | Preserve = false |
||
) |
Append inline code, this translates to the ` block in markdown.
Preserve
indicates the code span must be apparent even in plaintext.
Definition at line 435 of file Markup.cpp.
References Code.
Paragraph & clang::clangd::markup::Paragraph::appendSpace | ( | ) |
Ensure there is space between the surrounding chunks.
Has no effect at the beginning or end of a paragraph.
Definition at line 416 of file Markup.cpp.
Paragraph & clang::clangd::markup::Paragraph::appendText | ( | llvm::StringRef | Text | ) |
Append plain text to the end of the string.
Definition at line 422 of file Markup.cpp.
References clang::clangd::PlainText, and Text.
|
overridevirtual |
Implements clang::clangd::markup::Block.
Definition at line 369 of file Markup.cpp.
|
overridevirtual |
Implements clang::clangd::markup::Block.
Definition at line 346 of file Markup.cpp.
References OS, and clang::clangd::PlainText.
|
overridevirtual |
Implements clang::clangd::markup::Block.
Definition at line 384 of file Markup.cpp.
References clang::clangd::markup::chooseMarker(), and OS.