Skip to content

Commit 9c7ce4d

Browse files
committed
issue doxygen#11579 HTML-tables in markdown files with empty lines between the tags not properly rendered
1 parent a561ba4 commit 9c7ce4d

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/docnode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,7 +1962,7 @@ Token DocHtmlRow::parse()
19621962
else // found some other tag
19631963
{
19641964
warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <td> or <th> tag but "
1965-
"found <{}> instead!",parser()->context.token->name);
1965+
"found <{}{}> instead!",parser()->context.token->endTag ? "/" : "", parser()->context.token->name);
19661966
parser()->tokenizer.pushBackHtmlTag(parser()->context.token->name);
19671967
goto endrow;
19681968
}
@@ -2026,7 +2026,7 @@ Token DocHtmlRow::parse()
20262026
else // found some other tag
20272027
{
20282028
warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"expected <td>, <th> or <tr> tag but "
2029-
"found <{}> instead!",parser()->context.token->name);
2029+
"found <{}{}> instead!",parser()->context.token->endTag ? "/" : "", parser()->context.token->name);
20302030
parser()->tokenizer.pushBackHtmlTag(parser()->context.token->name);
20312031
goto endrow;
20322032
}

src/latexdocvisitor.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,17 @@ void LatexDocVisitor::operator()(const DocPara &p)
851851
!(p.parent() && // and for parameter sections
852852
std::get_if<DocParamSect>(p.parent())
853853
)
854-
) m_t << "\n\n";
854+
)
855+
{
856+
if (insideTable())
857+
{
858+
m_t << "~\\newline\n";
859+
}
860+
else
861+
{
862+
m_t << "\n\n";
863+
}
864+
}
855865
}
856866

857867
void LatexDocVisitor::operator()(const DocRoot &r)
@@ -1909,7 +1919,7 @@ void LatexDocVisitor::operator()(const DocParBlock &pb)
19091919

19101920
void LatexDocVisitor::filter(const QCString &str, const bool retainNewLine)
19111921
{
1912-
//printf("LatexDocVisitor::filter(%s) m_insideTabbing=%d\n",qPrint(str),m_ci.insideTabbing());
1922+
//printf("LatexDocVisitor::filter(%s) m_insideTabbing=%d m_insideTable=%d\n",qPrint(str),m_lcg.insideTabbing(),m_lcg.usedTableLevel()>0);
19131923
filterLatexString(m_t,str,
19141924
m_lcg.insideTabbing(),
19151925
m_insidePre,

0 commit comments

Comments
 (0)