clang-tools 10.0.0

Classes | Public Member Functions | List of all members
clang::clangd::markup::Paragraph Class Reference

Represents parts of the markup that can contain strings, like inline code, code block or plain text. More...

`#include <FormattedString.h>`

Inheritance diagram for clang::clangd::markup::Paragraph:
[legend]
Collaboration diagram for clang::clangd::markup::Paragraph:
[legend]

## Public Member Functions
void | renderMarkdown (llvm::raw_ostream &OS) const override
void | renderPlainText (llvm::raw_ostream &OS) const override
Paragraph & | appendText (std::string Text)
| Append plain text to the end of the string. More...
Paragraph & | appendCode (std::string Code)
| Append inline code, this translates to the ` block in markdown. More...
Public Member Functions inherited from clang::clangd::markup::Block
std::string | asMarkdown () const
std::string | asPlainText () const
virtual bool | isRuler () const
virtual | ~Block ()=default

## Detailed Description

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.

Definition at line 43 of file FormattedString.h.

## Member Function Documentation

## ◆ appendCode()

Paragraph& clang::clangd::markup::Paragraph::appendCode | ( | std::string | Code | ) |

Append inline code, this translates to the ` block in markdown.

Referenced by clang::clangd::HoverInfo::present().

## ◆ appendText()

Paragraph& clang::clangd::markup::Paragraph::appendText | ( | std::string | Text | ) |

Append plain text to the end of the string.

Referenced by clang::clangd::HoverInfo::present().

## ◆ renderMarkdown()

void clang::clangd::markup::Paragraph::renderMarkdown | ( | llvm::raw_ostream & | OS | ) | const
| override virtual

Implements clang::clangd::markup::Block.

## ◆ renderPlainText()

void clang::clangd::markup::Paragraph::renderPlainText | ( | llvm::raw_ostream & | OS | ) | const
| override virtual

Implements clang::clangd::markup::Block.

The documentation for this class was generated from the following file:

- FormattedString.h