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

Alex
This commit is contained in:
Alexander Neundorf 2009-01-10 09:01:37 -05:00
parent 4a6ea82257
commit f9920b47a8
1 changed files with 13 additions and 10 deletions

View File

@ -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();)