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, out, Portable::strnstr(), substitute(), and Trace::trunc().
Referenced by processSpecialCommand(), and writeFencedCodeBlock().
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, fileName, AnchorGenerator::generate(), AnchorGenerator::instance(), QCString::left(), lineNr, reg::search(), QCString::str(), Trace::trunc(), and warn.
Referenced by isAtxHeader(), and processBlocks().
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, isBlockCommand(), QCString::isEmpty(), isIdChar, QCString::length(), qstrncmp(), and Trace::trunc().
Referenced by processEmphasis1(), processEmphasis2(), and processEmphasis3().
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(), isBlockCommand(), QCString::isEmpty(), isNewline(), QCString::length(), processHtmlTagWrite(), qstrncmp(), and Trace::trunc().
Referenced by processBlocks(), and processQuotations().
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(), extractTitleId(), indentLevel, QCString::left(), QCString::length(), SectionType::MaxLevel, and Trace::trunc().
Referenced by writeOneLineHeaderOrRuler().
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(), QCString::size(), and Trace::trunc().
Referenced by findEmphasisChar(), findEndOfLine(), processBlocks(), and processSpecialCommand().
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, indentLevel, and Trace::trunc().
Referenced by processBlocks().
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().
Referenced by processSpecialCommand().
QCString Markdown::Private::processBlocks | ( | std::string_view | data, |
size_t | indent ) |
Definition at line 3199 of file markdown.cpp.
References AUTO_TRACE, codeBlockIndent, QCString::data(), end(), extractTitleId(), findEndOfLine(), isBlockCommand(), isCodeBlock(), QCString::isEmpty(), isEmptyLine(), isEndOfList(), isFencedCodeBlock(), isHeaderline(), isLinkRef(), isListMarker(), isTableBlock(), QCString::length(), linkRefs, out, qstrncmp(), TRUE, Trace::trunc(), QCString::view(), writeCodeBlock(), writeFencedCodeBlock(), writeOneLineHeaderOrRuler(), and writeTableBlock().
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, out, 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, processEmphasis1(), processEmphasis2(), processEmphasis3(), 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, findEmphasisChar(), out, processInline(), and Trace::trunc().
Referenced by processEmphasis(), and processEmphasis3().
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, findEmphasisChar(), out, processInline(), and Trace::trunc().
Referenced by processEmphasis(), and processEmphasis3().
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, findEmphasisChar(), out, processEmphasis1(), processEmphasis2(), processInline(), and Trace::trunc().
Referenced by processEmphasis().
int Markdown::Private::processHtmlTag | ( | std::string_view | data, |
size_t | offset ) |
Definition at line 1054 of file markdown.cpp.
References AUTO_TRACE, processHtmlTagWrite(), 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(), out, TRUE, and Trace::trunc().
Referenced by findEndOfLine(), and processHtmlTag().
void Markdown::Private::processInline | ( | std::string_view | data | ) |
Definition at line 1742 of file markdown.cpp.
References actions, AUTO_TRACE, end(), out, and Trace::trunc().
Referenced by processEmphasis1(), processEmphasis2(), processEmphasis3(), and processLink().
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(), fileName, QCString::find(), findFileDef(), getLanguageFromFileName(), Doxygen::imageNameLinkedMap, Portable::isAbsolutePath(), QCString::isEmpty(), FileInfo::isReadable(), isURL(), QCString::left(), QCString::length(), linkRefs, QCString::lower(), Markdown, SectionType::MaxLevel, QCString::mid(), SectionType::MinLevel, out, processInline(), QCString::setNum(), QCString::simplifyWhiteSpace(), QCString::str(), QCString::stripWhiteSpace(), substitute(), TRUE, Trace::trunc(), and writeMarkdownImage().
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, out, 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, Config_getBool, Config_getString, QCString::data(), end(), findEndOfLine(), isBlockQuote(), isEmptyLine(), isEndOfList(), isFencedCodeBlock(), isListMarker(), QCString::length(), out, processSpecialCommand(), qisspace(), qstrncmp(), Trace::trunc(), QCString::view(), writeBlockQuote(), and writeFencedCodeBlock().
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, out, and Trace::trunc().
int Markdown::Private::processSpecialCommand | ( | std::string_view | data, |
size_t | offset ) |
Definition at line 1669 of file markdown.cpp.
References addStrEscapeUtf8Nbsp(), AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, QCString::data(), isBlockCommand(), QCString::isEmpty(), isSpecialCommand(), QCString::length(), out, qstrncmp(), and Trace::trunc().
Referenced by processQuotations().
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(), out, QCString::str(), stripWhiteSpace(), and Trace::trunc().
Referenced by processQuotations().
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(), out, skipOverFileAndLineCommands(), and Trace::trunc().
Referenced by processBlocks().
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 addStrEscapeUtf8Nbsp(), AUTO_TRACE, out, and Trace::trunc().
Referenced by processBlocks(), and processQuotations().
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(), out, and Trace::trunc().
Referenced by processLink().
void Markdown::Private::writeOneLineHeaderOrRuler | ( | std::string_view | data | ) |
Definition at line 2665 of file markdown.cpp.
References AUTO_TRACE, hasLineBreak(), isAtxHeader(), isHRuler(), out, SectionType::Paragraph, SectionType::Section, QCString::sprintf(), SectionType::Subparagraph, SectionType::Subsection, SectionType::Subsubparagraph, SectionType::Subsubsection, TRUE, and Trace::trunc().
Referenced by processBlocks().
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(), out, QCString::setNum(), TRUE, and Trace::trunc().
Referenced by processBlocks().
std::array<Action_t,256> Markdown::Private::actions |
Definition at line 179 of file markdown.cpp.
Referenced by processInline().
QCString Markdown::Private::fileName |
Definition at line 175 of file markdown.cpp.
Referenced by extractTitleId(), and processLink().
int Markdown::Private::indentLevel =0 |
Definition at line 177 of file markdown.cpp.
Referenced by isAtxHeader(), and isHeaderline().
int Markdown::Private::lineNr = 0 |
Definition at line 176 of file markdown.cpp.
Referenced by extractTitleId().
std::unordered_map<std::string,LinkRef> Markdown::Private::linkRefs |
Definition at line 174 of file markdown.cpp.
Referenced by processBlocks(), and processLink().
QCString Markdown::Private::out |
Definition at line 178 of file markdown.cpp.
Referenced by addStrEscapeUtf8Nbsp(), processBlocks(), processCodeSpan(), processEmphasis1(), processEmphasis2(), processEmphasis3(), processHtmlTagWrite(), processInline(), processLink(), processNmdash(), processQuotations(), processQuoted(), processSpecialCommand(), writeBlockQuote(), writeCodeBlock(), writeFencedCodeBlock(), writeMarkdownImage(), writeOneLineHeaderOrRuler(), and writeTableBlock().