Doxygen
|
Classes | |
struct | LinkRef |
Public Types | |
using | Action_t = std::function<int(std::string_view,size_t)> |
Public Member Functions | |
Private (const QCString &fn, int line, int indent) | |
QCString | processQuotations (std::string_view data, size_t refIndent) |
QCString | processBlocks (std::string_view data, size_t indent) |
QCString | isBlockCommand (std::string_view data, size_t offset) |
size_t | isSpecialCommand (std::string_view data, size_t offset) |
size_t | findEndOfLine (std::string_view data, size_t offset) |
int | processHtmlTagWrite (std::string_view data, size_t offset, bool doWrite) |
Process a HTML tag. | |
int | processHtmlTag (std::string_view data, size_t offset) |
int | processEmphasis (std::string_view data, size_t offset) |
int | processEmphasis1 (std::string_view data, char c) |
process single emphasis | |
int | processEmphasis2 (std::string_view data, char c) |
process double emphasis | |
int | processEmphasis3 (std::string_view data, char c) |
Parsing triple emphasis. | |
int | processNmdash (std::string_view data, size_t offset) |
Process ndash and mdashes. | |
int | processQuoted (std::string_view data, size_t offset) |
Process quoted section "...", can contain one embedded newline. | |
int | processCodeSpan (std::string_view data, size_t offset) |
` parsing a code span (assuming codespan != 0) | |
int | processSpecialCommand (std::string_view data, size_t offset) |
int | processLink (std::string_view data, size_t offset) |
size_t | findEmphasisChar (std::string_view, char c, size_t c_size) |
looks for the next emph char, skipping other constructs, and stopping when either it is found, or we are at the end of a paragraph. | |
void | addStrEscapeUtf8Nbsp (std::string_view data) |
void | processInline (std::string_view data) |
void | writeMarkdownImage (std::string_view fmt, bool inline_img, bool explicitTitle, const QCString &title, const QCString &content, const QCString &link, const QCString &attributes, const FileDef *fd) |
int | isHeaderline (std::string_view data, bool allowAdjustLevel) |
returns whether the line is a setext-style hdr underline | |
int | isAtxHeader (std::string_view data, QCString &header, QCString &id, bool allowAdjustLevel, bool *pIsIdGenerated=nullptr) |
void | writeOneLineHeaderOrRuler (std::string_view data) |
void | writeFencedCodeBlock (std::string_view data, std::string_view lang, size_t blockStart, size_t blockEnd) |
size_t | writeBlockQuote (std::string_view data) |
size_t | writeCodeBlock (std::string_view, size_t refIndent) |
size_t | writeTableBlock (std::string_view data) |
QCString | extractTitleId (QCString &title, int level, bool *pIsIdGenerated=nullptr) |
Public Attributes | |
std::unordered_map< std::string, LinkRef > | linkRefs |
QCString | fileName |
int | lineNr = 0 |
int | indentLevel =0 |
QCString | out |
std::array< Action_t, 256 > | actions |
Definition at line 113 of file markdown.cpp.
using Markdown::Private::Action_t = std::function<int(std::string_view,size_t)> |
Definition at line 172 of file markdown.cpp.
|
inline |
Definition at line 115 of file markdown.cpp.
void Markdown::Private::addStrEscapeUtf8Nbsp | ( | std::string_view | data | ) |
Definition at line 1656 of file markdown.cpp.
References AUTO_TRACE, g_doxy_nbsp, g_utf8_nbsp, Portable::strnstr(), substitute(), and Trace::trunc().
QCString Markdown::Private::extractTitleId | ( | QCString & | title, |
int | level, | ||
bool * | pIsIdGenerated = nullptr ) |
Definition at line 1959 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Config_getInt, AnchorGenerator::generate(), AnchorGenerator::instance(), QCString::left(), reg::search(), QCString::str(), Trace::trunc(), and warn.
size_t Markdown::Private::findEmphasisChar | ( | std::string_view | data, |
char | c, | ||
size_t | c_size ) |
looks for the next emph char, skipping other constructs, and stopping when either it is found, or we are at the end of a paragraph.
Definition at line 657 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, QCString::data(), ignoreCloseEmphChar, QCString::isEmpty(), isIdChar, QCString::length(), qstrncmp(), and Trace::trunc().
size_t Markdown::Private::findEndOfLine | ( | std::string_view | data, |
size_t | offset ) |
Definition at line 2945 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, QCString::data(), end(), QCString::isEmpty(), isNewline(), QCString::length(), qstrncmp(), and Trace::trunc().
int Markdown::Private::isAtxHeader | ( | std::string_view | data, |
QCString & | header, | ||
QCString & | id, | ||
bool | allowAdjustLevel, | ||
bool * | pIsIdGenerated = nullptr ) |
Definition at line 1991 of file markdown.cpp.
References QCString::at(), AUTO_TRACE, AUTO_TRACE_EXIT, end(), QCString::left(), QCString::length(), SectionType::MaxLevel, and Trace::trunc().
QCString Markdown::Private::isBlockCommand | ( | std::string_view | data, |
size_t | offset ) |
Definition at line 357 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), and Trace::trunc().
int Markdown::Private::isHeaderline | ( | std::string_view | data, |
bool | allowAdjustLevel ) |
returns whether the line is a setext-style hdr underline
Definition at line 1772 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, and Trace::trunc().
size_t Markdown::Private::isSpecialCommand | ( | std::string_view | data, |
size_t | offset ) |
Definition at line 426 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), and Trace::trunc().
QCString Markdown::Private::processBlocks | ( | std::string_view | data, |
size_t | indent ) |
Definition at line 3199 of file markdown.cpp.
References AUTO_TRACE, QCString::clear(), codeBlockIndent, QCString::data(), end(), isCodeBlock(), QCString::isEmpty(), isEmptyLine(), isEndOfList(), isFencedCodeBlock(), isLinkRef(), isListMarker(), isTableBlock(), QCString::length(), qstrncmp(), TRUE, Trace::trunc(), and QCString::view().
int Markdown::Private::processCodeSpan | ( | std::string_view | data, |
size_t | offset ) |
`
parsing a code span (assuming codespan != 0)
Definition at line 1584 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), escapeSpecialChars(), isIdChar, and Trace::trunc().
int Markdown::Private::processEmphasis | ( | std::string_view | data, |
size_t | offset ) |
Definition at line 1060 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, extraChar, isIdChar, isOpenEmphChar, and Trace::trunc().
int Markdown::Private::processEmphasis1 | ( | std::string_view | data, |
char | c ) |
process single emphasis
Definition at line 770 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, and Trace::trunc().
int Markdown::Private::processEmphasis2 | ( | std::string_view | data, |
char | c ) |
process double emphasis
Definition at line 804 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, and Trace::trunc().
int Markdown::Private::processEmphasis3 | ( | std::string_view | data, |
char | c ) |
Parsing triple emphasis.
Finds the first closing tag, and delegates to the other emph
Definition at line 836 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, and Trace::trunc().
int Markdown::Private::processHtmlTag | ( | std::string_view | data, |
size_t | offset ) |
Definition at line 1054 of file markdown.cpp.
References AUTO_TRACE, and Trace::trunc().
int Markdown::Private::processHtmlTagWrite | ( | std::string_view | data, |
size_t | offset, | ||
bool | doWrite ) |
Process a HTML tag.
Note that
..
are treated specially, in the sense that all code inside is written unprocessed
Definition at line 964 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, FALSE, isIdChar, QCString::lower(), TRUE, and Trace::trunc().
void Markdown::Private::processInline | ( | std::string_view | data | ) |
Definition at line 1742 of file markdown.cpp.
References AUTO_TRACE, end(), and Trace::trunc().
int Markdown::Private::processLink | ( | std::string_view | data, |
size_t | offset ) |
Definition at line 1152 of file markdown.cpp.
References FileInfo::absFilePath(), AnchorGenerator::addPrefixIfNeeded(), QCString::at(), AUTO_TRACE, AUTO_TRACE_EXIT, Config_getEnum, Config_getInt, FileInfo::exists(), externalLinkTarget(), FALSE, FileInfo::fileName(), QCString::find(), findFileDef(), getLanguageFromFileName(), Doxygen::imageNameLinkedMap, Portable::isAbsolutePath(), QCString::isEmpty(), FileInfo::isReadable(), isURL(), QCString::left(), QCString::length(), QCString::lower(), Markdown, SectionType::MaxLevel, QCString::mid(), SectionType::MinLevel, QCString::setNum(), QCString::simplifyWhiteSpace(), QCString::str(), QCString::stripWhiteSpace(), substitute(), TRUE, and Trace::trunc().
int Markdown::Private::processNmdash | ( | std::string_view | data, |
size_t | offset ) |
Process ndash and mdashes.
Definition at line 898 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, qstrncmp(), and Trace::trunc().
QCString Markdown::Private::processQuotations | ( | std::string_view | data, |
size_t | refIndent ) |
Definition at line 3040 of file markdown.cpp.
References AUTO_TRACE, QCString::clear(), Config_getBool, Config_getString, QCString::data(), end(), isBlockQuote(), isEmptyLine(), isEndOfList(), isFencedCodeBlock(), isListMarker(), QCString::length(), qisspace(), qstrncmp(), Trace::trunc(), and QCString::view().
int Markdown::Private::processQuoted | ( | std::string_view | data, |
size_t | offset ) |
Process quoted section "...", can contain one embedded newline.
Definition at line 940 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, and Trace::trunc().
int Markdown::Private::processSpecialCommand | ( | std::string_view | data, |
size_t | offset ) |
Definition at line 1669 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, QCString::data(), QCString::isEmpty(), QCString::length(), qstrncmp(), and Trace::trunc().
size_t Markdown::Private::writeBlockQuote | ( | std::string_view | data | ) |
Definition at line 2725 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, decrLevel(), end(), g_quotationHeaderMap, QCString::lower(), QCString::str(), stripWhiteSpace(), and Trace::trunc().
size_t Markdown::Private::writeCodeBlock | ( | std::string_view | data, |
size_t | refIndent ) |
Definition at line 2877 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, codeBlockIndent, end(), skipOverFileAndLineCommands(), and Trace::trunc().
void Markdown::Private::writeFencedCodeBlock | ( | std::string_view | data, |
std::string_view | lang, | ||
size_t | blockStart, | ||
size_t | blockEnd ) |
Definition at line 3017 of file markdown.cpp.
References AUTO_TRACE, and Trace::trunc().
void Markdown::Private::writeMarkdownImage | ( | std::string_view | fmt, |
bool | inline_img, | ||
bool | explicitTitle, | ||
const QCString & | title, | ||
const QCString & | content, | ||
const QCString & | link, | ||
const QCString & | attributes, | ||
const FileDef * | fd ) |
Definition at line 1109 of file markdown.cpp.
References AUTO_TRACE, escapeDoubleQuotes(), getFilteredImageAttributes(), QCString::isEmpty(), QCString::mid(), and Trace::trunc().
void Markdown::Private::writeOneLineHeaderOrRuler | ( | std::string_view | data | ) |
Definition at line 2665 of file markdown.cpp.
References AUTO_TRACE, hasLineBreak(), isHRuler(), SectionType::Paragraph, SectionType::Section, QCString::sprintf(), SectionType::Subparagraph, SectionType::Subsection, SectionType::Subsubparagraph, SectionType::Subsubsection, TRUE, and Trace::trunc().
size_t Markdown::Private::writeTableBlock | ( | std::string_view | data | ) |
Definition at line 2446 of file markdown.cpp.
References AlignCenter, AlignLeft, AlignNone, AlignRight, AUTO_TRACE, AUTO_TRACE_EXIT, end(), FALSE, findTableColumns(), markersToAlignment(), QCString::setNum(), TRUE, and Trace::trunc().
std::array<Action_t,256> Markdown::Private::actions |
Definition at line 179 of file markdown.cpp.
QCString Markdown::Private::fileName |
Definition at line 175 of file markdown.cpp.
int Markdown::Private::indentLevel =0 |
Definition at line 177 of file markdown.cpp.
int Markdown::Private::lineNr = 0 |
Definition at line 176 of file markdown.cpp.
std::unordered_map<std::string,LinkRef> Markdown::Private::linkRefs |
Definition at line 174 of file markdown.cpp.
QCString Markdown::Private::out |
Definition at line 178 of file markdown.cpp.