Commit f9920b47 authored by Alexander Neundorf's avatar Alexander Neundorf
Browse files

BUG: don't create empty <itemizedlist>s (#7289), dblatex didn't like that

Alex
parent 4a6ea822
......@@ -134,20 +134,23 @@ void cmDocumentationFormatterDocbook
const std::vector<cmDocumentationEntry> &entries =
section.GetEntries();
os << "<itemizedlist>\n";
for(std::vector<cmDocumentationEntry>::const_iterator op
= entries.begin(); op != entries.end(); ++ op )
if (!entries.empty())
{
if(op->Name.size())
os << "<itemizedlist>\n";
for(std::vector<cmDocumentationEntry>::const_iterator op
= entries.begin(); op != entries.end(); ++ op )
{
os << " <listitem><link linkend=\"" << prefix << "_";
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
os << "\"><emphasis><literal>";
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
os << "</literal></emphasis></link></listitem>\n";
if(op->Name.size())
{
os << " <listitem><link linkend=\"" << prefix << "_";
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
os << "\"><emphasis><literal>";
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
os << "</literal></emphasis></link></listitem>\n";
}
}
os << "</itemizedlist>\n" ;
}
os << "</itemizedlist>\n" ;
for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
op != entries.end();)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment