#include "support/Markup.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/raw_ostream.h"
#include <cstddef>
#include <iterator>
#include <memory>
#include <string>
#include <vector>
namespace clang {
namespace clangd {
namespace markup {
namespace {
bool looksLikeTag(llvm::StringRef Contents) { … }
bool needsLeadingEscape(char C, llvm::StringRef Before, llvm::StringRef After,
bool StartsLine) { … }
std::string renderText(llvm::StringRef Input, bool StartsLine) { … }
std::string renderInlineBlock(llvm::StringRef Input) { … }
std::string getMarkerForCodeBlock(llvm::StringRef Input) { … }
std::string canonicalizeSpaces(llvm::StringRef Input) { … }
std::string renderBlocks(llvm::ArrayRef<std::unique_ptr<Block>> Children,
void (Block::*RenderFunc)(llvm::raw_ostream &) const) { … }
class Ruler : public Block { … };
class CodeBlock : public Block { … };
std::string indentLines(llvm::StringRef Input) { … }
class Heading : public Paragraph { … };
}
std::string Block::asMarkdown() const { … }
std::string Block::asPlainText() const { … }
void Paragraph::renderMarkdown(llvm::raw_ostream &OS) const { … }
std::unique_ptr<Block> Paragraph::clone() const { … }
llvm::StringRef chooseMarker(llvm::ArrayRef<llvm::StringRef> Options,
llvm::StringRef Text) { … }
void Paragraph::renderPlainText(llvm::raw_ostream &OS) const { … }
BulletList::BulletList() = default;
BulletList::~BulletList() = default;
void BulletList::renderMarkdown(llvm::raw_ostream &OS) const { … }
void BulletList::renderPlainText(llvm::raw_ostream &OS) const { … }
Paragraph &Paragraph::appendSpace() { … }
Paragraph &Paragraph::appendText(llvm::StringRef Text) { … }
Paragraph &Paragraph::appendCode(llvm::StringRef Code, bool Preserve) { … }
std::unique_ptr<Block> BulletList::clone() const { … }
class Document &BulletList::addItem() { … }
Document &Document::operator=(const Document &Other) { … }
void Document::append(Document Other) { … }
Paragraph &Document::addParagraph() { … }
void Document::addRuler() { … }
void Document::addCodeBlock(std::string Code, std::string Language) { … }
std::string Document::asMarkdown() const { … }
std::string Document::asPlainText() const { … }
BulletList &Document::addBulletList() { … }
Paragraph &Document::addHeading(size_t Level) { … }
}
}
}