summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentationFormatterDocbook.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-01-10 14:01:37 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2009-01-10 14:01:37 (GMT)
commitf9920b47a85cda3fc0fdf2e064c2d8bc87133fa3 (patch)
tree3b2658c8986742e141da06c92d638d382a3b2ca9 /Source/cmDocumentationFormatterDocbook.cxx
parent4a6ea82257cecd74edabc2f61a1d87a4aad0130d (diff)
downloadCMake-f9920b47a85cda3fc0fdf2e064c2d8bc87133fa3.zip
CMake-f9920b47a85cda3fc0fdf2e064c2d8bc87133fa3.tar.gz
CMake-f9920b47a85cda3fc0fdf2e064c2d8bc87133fa3.tar.bz2
BUG: don't create empty <itemizedlist>s (#7289), dblatex didn't like that
Alex
Diffstat (limited to 'Source/cmDocumentationFormatterDocbook.cxx')
-rw-r--r--Source/cmDocumentationFormatterDocbook.cxx23
1 files changed, 13 insertions, 10 deletions
diff --git a/Source/cmDocumentationFormatterDocbook.cxx b/Source/cmDocumentationFormatterDocbook.cxx
index a34689b..90c968a 100644
--- a/Source/cmDocumentationFormatterDocbook.cxx
+++ b/Source/cmDocumentationFormatterDocbook.cxx
@@ -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();)