Doxygen
|
#include <stdio.h>
#include <unordered_map>
#include <functional>
#include <atomic>
#include <array>
#include <string_view>
#include "markdown.h"
#include "debug.h"
#include "util.h"
#include "doxygen.h"
#include "commentscan.h"
#include "entry.h"
#include "config.h"
#include "message.h"
#include "portable.h"
#include "regex.h"
#include "fileinfo.h"
#include "trace.h"
#include "anchor.h"
#include "stringutil.h"
Go to the source code of this file.
Classes | |
struct | TableCell |
struct | Markdown::Private |
struct | Markdown::Private::LinkRef |
struct | MarkdownOutlineParser::Private |
Macros | |
#define | AUTO_TRACE(...) |
#define | AUTO_TRACE_ADD(...) |
#define | AUTO_TRACE_EXIT(...) |
#define | isIdChar(c) |
#define | extraChar(c) |
#define | isOpenEmphChar(c) |
#define | ignoreCloseEmphChar(c, cn) |
#define | isLiTag(i) |
Enumerations | |
enum class | ExplicitPageResult { explicitPage , explicitMainPage , explicitDirPage , notExplicit } |
enum | Alignment { AlignNone , AlignLeft , AlignCenter , AlignRight } |
Functions | |
size_t | isNewline (std::string_view data) |
static QCString | escapeDoubleQuotes (const QCString &s) |
static QCString | escapeSpecialChars (const QCString &s) |
static Alignment | markersToAlignment (bool leftMarker, bool rightMarker) |
helper function to convert presence of left and/or right alignment markers to a alignment value | |
static QCString | getFilteredImageAttributes (std::string_view fmt, const QCString &attrs) |
parse the image attributes and return attributes for given format | |
static bool | isBlockQuote (std::string_view data, size_t indent) |
returns true if this line starts a block quote | |
static size_t | isLinkRef (std::string_view data, QCString &refid, QCString &link, QCString &title) |
returns end of the link ref if this is indeed a link reference. | |
static bool | isHRuler (std::string_view data) |
static bool | isEmptyLine (std::string_view data) |
static size_t | computeIndentExcludingListMarkers (std::string_view data) |
static size_t | isListMarker (std::string_view data) |
static bool | isEndOfList (std::string_view data) |
static bool | isFencedCodeBlock (std::string_view data, size_t refIndent, QCString &lang, size_t &start, size_t &end, size_t &offset) |
static bool | isCodeBlock (std::string_view data, size_t offset, size_t &indent) |
static size_t | findTableColumns (std::string_view data, size_t &start, size_t &end, size_t &columns) |
Finds the location of the table's contains in the string data. | |
static bool | isTableBlock (std::string_view data) |
Returns TRUE iff data points to the start of a table block. | |
static bool | hasLineBreak (std::string_view data) |
bool | skipOverFileAndLineCommands (std::string_view data, size_t indent, size_t &offset, std::string &location) |
static ExplicitPageResult | isExplicitPage (const QCString &docs) |
QCString | markdownFileNameToId (const QCString &fileName) |
processes string s and converts markdown into doxygen/html commands. | |
Variables | |
const char * | g_utf8_nbsp = "\xc2\xa0" |
const char * | g_doxy_nbsp = "&_doxy_nbsp;" |
const size_t | codeBlockIndent = 4 |
static const std::unordered_map< std::string, std::string > | g_quotationHeaderMap |
#define AUTO_TRACE | ( | ... | ) |
Definition at line 61 of file markdown.cpp.
Referenced by escapeDoubleQuotes(), escapeSpecialChars(), and getFilteredImageAttributes().
#define AUTO_TRACE_ADD | ( | ... | ) |
Definition at line 62 of file markdown.cpp.
#define AUTO_TRACE_EXIT | ( | ... | ) |
Definition at line 63 of file markdown.cpp.
Referenced by escapeDoubleQuotes(), escapeSpecialChars(), and getFilteredImageAttributes().
#define extraChar | ( | c | ) |
Definition at line 84 of file markdown.cpp.
Referenced by Markdown::Private::processEmphasis().
#define ignoreCloseEmphChar | ( | c, | |
cn ) |
Definition at line 100 of file markdown.cpp.
Referenced by Markdown::Private::findEmphasisChar().
#define isIdChar | ( | c | ) |
Definition at line 77 of file markdown.cpp.
Referenced by Markdown::Private::findEmphasisChar(), reg::Ex::Private::matchAt(), Markdown::Private::processCodeSpan(), Markdown::Private::processEmphasis(), and Markdown::Private::processHtmlTagWrite().
#define isLiTag | ( | i | ) |
Definition at line 2072 of file markdown.cpp.
Referenced by computeIndentExcludingListMarkers().
#define isOpenEmphChar | ( | c | ) |
Definition at line 93 of file markdown.cpp.
Referenced by Markdown::Private::processEmphasis().
enum Alignment |
|
strong |
Definition at line 66 of file markdown.cpp.
|
static |
Definition at line 2080 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, FALSE, isLiTag, TRUE, and Trace::trunc().
Referenced by isCodeBlock(), and isListMarker().
Definition at line 217 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, QCString::data(), QCString::isEmpty(), and Trace::trunc().
Referenced by Markdown::Private::writeMarkdownImage().
Definition at line 235 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, QCString::data(), FALSE, QCString::isEmpty(), and Trace::trunc().
Referenced by Markdown::Private::processCodeSpan().
|
static |
Finds the location of the table's contains in the string data.
Only one line will be inspected.
[in] | data | pointer to the string buffer. |
[out] | start | offset of the first character of the table content |
[out] | end | offset of the last character of the table content |
[out] | columns | number of table columns found |
Definition at line 2365 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), eol, isNewline(), and Trace::trunc().
Referenced by isTableBlock(), and Markdown::Private::writeTableBlock().
parse the image attributes and return attributes for given format
Definition at line 310 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, QCString::find(), QCString::left(), QCString::lower(), QCString::mid(), split(), QCString::str(), and QCString::stripWhiteSpace().
Referenced by Markdown::Private::writeMarkdownImage().
|
static |
Definition at line 2646 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, and Trace::trunc().
Referenced by Markdown::Private::writeOneLineHeaderOrRuler().
|
static |
returns true if this line starts a block quote
Definition at line 1809 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, codeBlockIndent, and Trace::trunc().
Referenced by Markdown::Private::processQuotations().
|
static |
Definition at line 2272 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, codeBlockIndent, computeIndentExcludingListMarkers(), FALSE, isEmptyLine(), isNewline(), and Trace::trunc().
Referenced by Markdown::Private::processBlocks().
|
static |
Definition at line 2058 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, and Trace::trunc().
Referenced by isCodeBlock(), Markdown::Private::processBlocks(), and Markdown::Private::processQuotations().
|
static |
Definition at line 2160 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, and Trace::trunc().
Referenced by Markdown::Private::processBlocks(), and Markdown::Private::processQuotations().
|
static |
Definition at line 3405 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, explicitDirPage, explicitMainPage, explicitPage, notExplicit, qstrncmp(), QCString::str(), and Trace::trunc().
Referenced by MarkdownOutlineParser::parseInput().
|
static |
extract python or .py from python...
or .py...
Definition at line 2187 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), FALSE, and Trace::trunc().
Referenced by Markdown::Private::processBlocks(), and Markdown::Private::processQuotations().
|
static |
Definition at line 1927 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, and Trace::trunc().
Referenced by Markdown::Private::writeOneLineHeaderOrRuler().
|
static |
returns end of the link ref if this is indeed a link reference.
Definition at line 1838 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, QCString::clear(), end(), eol, QCString::isEmpty(), and Trace::trunc().
Referenced by Markdown::Private::processBlocks().
|
static |
Definition at line 2149 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, computeIndentExcludingListMarkers(), and Trace::trunc().
Referenced by Markdown::Private::processBlocks(), and Markdown::Private::processQuotations().
|
inline |
Definition at line 207 of file markdown.cpp.
References qstrncmp().
Referenced by Markdown::Private::findEndOfLine(), findTableColumns(), and isCodeBlock().
|
static |
Returns TRUE iff data points to the start of a table block.
Definition at line 2406 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), FALSE, findTableColumns(), and Trace::trunc().
Referenced by Markdown::Private::processBlocks().
processes string s and converts markdown into doxygen/html commands.
Definition at line 3558 of file markdown.cpp.
References FileInfo::absFilePath(), AUTO_TRACE, AUTO_TRACE_EXIT, escapeCharsInString(), QCString::findRev(), QCString::left(), QCString::str(), and stripFromPath().
Referenced by DocRef::DocRef(), DocSecRefItem::parse(), and MarkdownOutlineParser::parseInput().
|
static |
helper function to convert presence of left and/or right alignment markers to a alignment value
Definition at line 289 of file markdown.cpp.
References AlignCenter, AlignLeft, AlignNone, and AlignRight.
Referenced by Markdown::Private::writeTableBlock().
bool skipOverFileAndLineCommands | ( | std::string_view | data, |
size_t | indent, | ||
size_t & | offset, | ||
std::string & | location ) |
Definition at line 2843 of file markdown.cpp.
References found, and qstrncmp().
Referenced by Markdown::Private::writeCodeBlock().
const size_t codeBlockIndent = 4 |
Definition at line 201 of file markdown.cpp.
Referenced by isBlockQuote(), isCodeBlock(), Markdown::Private::processBlocks(), and Markdown::Private::writeCodeBlock().
const char* g_doxy_nbsp = "&_doxy_nbsp;" |
Definition at line 200 of file markdown.cpp.
Referenced by Markdown::Private::addStrEscapeUtf8Nbsp(), and Markdown::process().
|
static |
Definition at line 2716 of file markdown.cpp.
Referenced by Markdown::Private::writeBlockQuote().
const char* g_utf8_nbsp = "\xc2\xa0" |
Definition at line 199 of file markdown.cpp.
Referenced by Markdown::Private::addStrEscapeUtf8Nbsp().