Skip to content

Commit 2bca55c

Browse files
committed
Tables without any rows result in error in LaTeX
Based on the analyses in comment doxygen#8049 (comment) where a lone `<table>` tag was identified which resulted in an empty table in the LaTeX output. which resulted in the error: ``` ! Missing # inserted in alignment preamble. <to be read again> \cr l.24 \end{longtabu} ? ``` when building the pdf file. Source code: ``` /** * Defines the style from attributes and properties of an AbiWord <table>. */ void fetchAttributesFromAbiTable(const PP_AttrProp* pAP) { } ``` Empty tables (i.e. tables without any rows are discarded.
1 parent 58cc4f3 commit 2bca55c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/docnode.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4975,6 +4975,7 @@ Token DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &
49754975
{
49764976
children().append<DocHtmlTable>(parser(),thisVariant(),tagHtmlAttribs);
49774977
retval=children().get_last<DocHtmlTable>()->parse();
4978+
if (children().get_last<DocHtmlTable>()->children().empty()) children().pop_back();
49784979
}
49794980
break;
49804981
case HtmlTagType::HTML_TR:
@@ -5270,6 +5271,7 @@ Token DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &
52705271
{
52715272
children().append<DocHtmlTable>(parser(),thisVariant(),emptyList);
52725273
retval=children().get_last<DocHtmlTable>()->parseXml();
5274+
if (children().get_last<DocHtmlTable>()->children().empty()) children().pop_back();
52735275
}
52745276
else
52755277
{

0 commit comments

Comments
 (0)