|
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 "commentcnv.h"#include "cmdmapper.h"#include "config.h"#include "message.h"#include "portable.h"#include "regex.h"#include "filedef.h"#include "fileinfo.h"#include "trace.h"#include "anchor.h"#include "stringutil.h"#include "filename.h"#include "section.h"#include "plantuml.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 | isLiTag(i) |
| #define | OPC(x) |
Enumerations | |
| enum class | ExplicitPageResult { explicitPage , explicitMainPage , explicitOtherPage , notExplicit } |
| enum class | Alignment { None , Left , Center , Right } |
Functions | |
| static constexpr bool | isIdChar (char c) |
| static constexpr bool | extraChar (char c) |
| static constexpr bool | isOpenEmphChar (char c) |
| static constexpr bool | isUtf8Nbsp (char c1, char c2) |
| static constexpr bool | isAllowedEmphStr (const std::string_view &data, size_t offset) |
| static constexpr bool | ignoreCloseEmphChar (char c, char cn) |
| size_t | isNewline (std::string_view data) |
| static DString | escapeDoubleQuotes (const DString &s) |
| static DString | escapeSpecialChars (const DString &s) |
| static constexpr Alignment | markersToAlignment (bool leftMarker, bool rightMarker) |
| helper function to convert presence of left and/or right alignment markers to an alignment value | |
| static DString | getFilteredImageAttributes (std::string_view fmt, const DString &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, DString &refid, DString &link, DString &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, DString &lang, size_t &start, size_t &end, size_t &offset, DString &fileName, int lineNr) |
| 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 bool | isOtherPage (std::string_view data) |
| static ExplicitPageResult | isExplicitPage (const DString &docs) |
| DString | markdownFileNameToId (const DString &fileName) |
| processes string s and converts markdown into doxygen/html commands. | |
Variables | |
| static const char * | g_utf8_nbsp = "\xc2\xa0" |
| static const char * | g_doxy_nbsp = "&_doxy_nbsp;" |
| static const size_t | codeBlockIndent = 4 |
| static const std::unordered_map< std::string, std::string > | g_quotationHeaderMap |
| #define AUTO_TRACE | ( | ... | ) |
Definition at line 67 of file markdown.cpp.
| #define AUTO_TRACE_ADD | ( | ... | ) |
Definition at line 68 of file markdown.cpp.
| #define AUTO_TRACE_EXIT | ( | ... | ) |
Definition at line 69 of file markdown.cpp.
| #define isLiTag | ( | i | ) |
Definition at line 2250 of file markdown.cpp.
Referenced by computeIndentExcludingListMarkers().
| #define OPC | ( | x | ) |
Referenced by isOtherPage().
|
strong |
|
strong |
Definition at line 72 of file markdown.cpp.
|
static |
Definition at line 2258 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, computeIndentExcludingListMarkers(), isLiTag, and Trace::trunc().
Referenced by computeIndentExcludingListMarkers(), isCodeBlock(), and isListMarker().
Definition at line 244 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, DString::data(), DString::empty(), escapeDoubleQuotes(), and Trace::trunc().
Referenced by escapeDoubleQuotes(), and Markdown::Private::writeMarkdownImage().
Definition at line 262 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Config_getBool, DString::data(), DString::empty(), escapeSpecialChars(), and Trace::trunc().
Referenced by escapeSpecialChars(), and Markdown::Private::processCodeSpan().
|
staticconstexpr |
Definition at line 92 of file markdown.cpp.
References extraChar().
Referenced by extraChar(), and Markdown::Private::processEmphasis().
|
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 2564 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), eol, findTableColumns(), isNewline(), and Trace::trunc().
Referenced by findTableColumns(), isTableBlock(), and Markdown::Private::writeTableBlock().
parse the image attributes and return attributes for given format
Definition at line 347 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, DString::DString(), DString::find(), getFilteredImageAttributes(), DString::left(), DString::lower(), DString::mid(), DString::npos, split(), DString::str(), and DString::stripWhiteSpace().
Referenced by getFilteredImageAttributes(), and Markdown::Private::writeMarkdownImage().
|
static |
Definition at line 2853 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, hasLineBreak(), and Trace::trunc().
Referenced by hasLineBreak(), and Markdown::Private::writeOneLineHeaderOrRuler().
|
staticconstexpr |
Definition at line 122 of file markdown.cpp.
References ignoreCloseEmphChar().
Referenced by Markdown::Private::findEmphasisChar(), and ignoreCloseEmphChar().
|
staticconstexpr |
Definition at line 114 of file markdown.cpp.
References isAllowedEmphStr(), isOpenEmphChar(), and isUtf8Nbsp().
Referenced by isAllowedEmphStr(), and Markdown::Private::processEmphasis().
|
static |
returns true if this line starts a block quote
Definition at line 1979 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, codeBlockIndent, isBlockQuote(), and Trace::trunc().
Referenced by isBlockQuote(), and Markdown::Private::processQuotations().
|
static |
Definition at line 2467 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, codeBlockIndent, computeIndentExcludingListMarkers(), isCodeBlock(), isEmptyLine(), isNewline(), and Trace::trunc().
Referenced by isCodeBlock(), and Markdown::Private::processBlocks().
|
static |
Definition at line 2236 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, isEmptyLine(), and Trace::trunc().
Referenced by isCodeBlock(), isEmptyLine(), Markdown::Private::processBlocks(), and Markdown::Private::processQuotations().
|
static |
Definition at line 2339 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, isEndOfList(), and Trace::trunc().
Referenced by isEndOfList(), Markdown::Private::processBlocks(), and Markdown::Private::processQuotations().
|
static |
Definition at line 3649 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, explicitMainPage, explicitOtherPage, explicitPage, isExplicitPage(), isOtherPage(), literal_at(), notExplicit, DString::str(), and Trace::trunc().
Referenced by isExplicitPage(), and MarkdownOutlineParser::parseInput().
|
static |
extract python or .py from python... or .py...
Definition at line 2366 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), isFencedCodeBlock(), DString::substr(), Trace::trunc(), and warn.
Referenced by isFencedCodeBlock(), Markdown::Private::processBlocks(), and Markdown::Private::processQuotations().
|
static |
Definition at line 2097 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, isHRuler(), and Trace::trunc().
Referenced by isHRuler(), Markdown::Private::writeBlockQuote(), and Markdown::Private::writeOneLineHeaderOrRuler().
|
staticconstexpr |
Definition at line 83 of file markdown.cpp.
References isIdChar().
Referenced by Markdown::Private::findEmphasisChar(), isIdChar(), Markdown::Private::processCodeSpan(), Markdown::Private::processEmphasis(), and Markdown::Private::processHtmlTagWrite().
returns end of the link ref if this is indeed a link reference.
Definition at line 2008 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, DString::clear(), DString::empty(), end(), eol, isLinkRef(), DString::substr(), and Trace::trunc().
Referenced by isLinkRef(), and Markdown::Private::processBlocks().
|
static |
Definition at line 2328 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, computeIndentExcludingListMarkers(), isListMarker(), and Trace::trunc().
Referenced by isListMarker(), Markdown::Private::processBlocks(), Markdown::Private::processQuotations(), and Markdown::Private::writeBlockQuote().
|
inline |
Definition at line 231 of file markdown.cpp.
References isNewline(), and literal_at().
Referenced by Markdown::Private::findEndOfLine(), findTableColumns(), isCodeBlock(), and isNewline().
|
staticconstexpr |
Definition at line 101 of file markdown.cpp.
References isOpenEmphChar().
Referenced by isAllowedEmphStr(), and isOpenEmphChar().
|
static |
Definition at line 3636 of file markdown.cpp.
References isOtherPage(), and OPC.
Referenced by isExplicitPage(), and isOtherPage().
|
static |
Returns true iff data points to the start of a table block.
Definition at line 2613 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), findTableColumns(), isTableBlock(), and Trace::trunc().
Referenced by isTableBlock(), and Markdown::Private::processBlocks().
|
staticconstexpr |
Definition at line 109 of file markdown.cpp.
References isUtf8Nbsp().
Referenced by isAllowedEmphStr(), and isUtf8Nbsp().
processes string s and converts markdown into doxygen/html commands.
Definition at line 3799 of file markdown.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, escapeCharsInString(), FileInfo::FileInfo(), DString::left(), markdownFileNameToId(), DString::npos, DString::rfind(), DString::str(), and stripFromPath().
Referenced by DocRef::DocRef(), markdownFileNameToId(), DocSecRefItem::parse(), and MarkdownOutlineParser::parseInput().
|
staticconstexpr |
helper function to convert presence of left and/or right alignment markers to an alignment value
Definition at line 326 of file markdown.cpp.
References Center, Left, markersToAlignment(), None, and Right.
Referenced by markersToAlignment(), and Markdown::Private::writeTableBlock().
| bool skipOverFileAndLineCommands | ( | std::string_view | data, |
| size_t | indent, | ||
| size_t & | offset, | ||
| std::string & | location ) |
Definition at line 3050 of file markdown.cpp.
References literal_at(), and skipOverFileAndLineCommands().
Referenced by skipOverFileAndLineCommands(), and Markdown::Private::writeCodeBlock().
|
static |
Definition at line 225 of file markdown.cpp.
Referenced by isBlockQuote(), isCodeBlock(), Markdown::Private::processBlocks(), and Markdown::Private::writeCodeBlock().
|
static |
Definition at line 224 of file markdown.cpp.
Referenced by Markdown::Private::addStrEscapeUtf8Nbsp(), and Markdown::process().
|
static |
Definition at line 2923 of file markdown.cpp.
Referenced by Markdown::Private::writeBlockQuote().
|
static |
Definition at line 223 of file markdown.cpp.
Referenced by Markdown::Private::addStrEscapeUtf8Nbsp().