summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-05-25 20:35:53 (GMT)
committerGitHub <noreply@github.com>2021-05-25 20:35:53 (GMT)
commitda0a6b42c349bc06b2804a4b0e8f55c7690f5cf9 (patch)
tree568de3307b61b5ee116649640eab65d8cac53ff4
parent20c7a167d1cb6fb024d740538261b37b8e32d511 (diff)
parent4ba3ff7849f4d3291cbbdca8ab0b6888fd549701 (diff)
downloadDoxygen-da0a6b42c349bc06b2804a4b0e8f55c7690f5cf9.zip
Doxygen-da0a6b42c349bc06b2804a4b0e8f55c7690f5cf9.tar.gz
Doxygen-da0a6b42c349bc06b2804a4b0e8f55c7690f5cf9.tar.bz2
Merge pull request #8543 from albert-github/feature/bug_debug_markdown
Confusing debug output for markdown
-rw-r--r--src/markdown.cpp14
-rw-r--r--src/markdown.h2
2 files changed, 12 insertions, 4 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 59ef730..48a46cd 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -2695,7 +2695,7 @@ QCString Markdown::detab(const QCString &s,int &refIndent)
//---------------------------------------------------------------------------
-QCString Markdown::process(const QCString &input, int &startNewlines)
+QCString Markdown::process(const QCString &input, int &startNewlines, bool fromParseInput)
{
if (input.isEmpty()) return input;
int refIndent;
@@ -2718,7 +2718,14 @@ QCString Markdown::process(const QCString &input, int &startNewlines)
m_out.clear();
processInline(s.data(),s.length());
m_out.addChar(0);
- Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n=========\n",qPrint(input),qPrint(m_out.get()));
+ if (fromParseInput)
+ {
+ Debug::print(Debug::Markdown,0,"---- output -----\n%s\n=========\n",qPrint(m_out.get()));
+ }
+ else
+ {
+ Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n=========\n",qPrint(input),qPrint(m_out.get()));
+ }
// post processing
QCString result = substitute(m_out.get(),g_doxy_nsbp,"&nbsp;");
@@ -2785,6 +2792,7 @@ void MarkdownOutlineParser::parseInput(const QCString &fileName,
current->docFile = fileName;
current->docLine = 1;
QCString docs = fileBuf;
+ Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n",qPrint(fileBuf));
QCString id;
Markdown markdown(fileName,1,0);
QCString title=markdown.extractPageTitle(docs,id,prepend).stripWhiteSpace();
@@ -2827,7 +2835,7 @@ void MarkdownOutlineParser::parseInput(const QCString &fileName,
Protection prot=Public;
bool needsEntry = FALSE;
int position=0;
- QCString processedDocs = markdown.process(docs,lineNr);
+ QCString processedDocs = markdown.process(docs,lineNr,true);
while (p->commentScanner.parseCommentBlock(
this,
current.get(),
diff --git a/src/markdown.h b/src/markdown.h
index afed003..9d5343c 100644
--- a/src/markdown.h
+++ b/src/markdown.h
@@ -33,7 +33,7 @@ class Markdown
{
public:
Markdown(const QCString &fileName,int lineNr,int indentLevel=0);
- QCString process(const QCString &input, int &startNewlines);
+ QCString process(const QCString &input, int &startNewlines, bool fromParseInput = false);
QCString extractPageTitle(QCString &docs,QCString &id,int &prepend);
void setIndentLevel(int level) { m_indentLevel = level; }