docbook: Fix the DocBook section output
The DocBook formatter used to generate something like: <para id="section"><sect2><title>Title</title></sect2>Some Text</para> Which was completely wrong. In DocBook, a section should look like this: <sect2 id="section"><title>Title</title><para>Some Text</para></sect2>
This commit is contained in:
parent
dbfe335099
commit
55146ed0f0
|
@ -120,40 +120,31 @@ void cmDocumentationFormatterDocbook
|
||||||
section.GetEntries();
|
section.GetEntries();
|
||||||
|
|
||||||
for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
|
for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
|
||||||
op != entries.end();)
|
op != entries.end(); ++op)
|
||||||
{
|
{
|
||||||
if(op->Name.size())
|
if(op->Name.size())
|
||||||
{
|
{
|
||||||
for(;op != entries.end() && op->Name.size(); ++op)
|
os << "<sect2 id=\"";
|
||||||
|
this->PrintId(os, prefix.c_str(), op->Name);
|
||||||
|
os << "\">\n<title>";
|
||||||
|
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
|
||||||
|
os << "</title>\n";
|
||||||
|
if(op->Full.size())
|
||||||
{
|
{
|
||||||
if(op->Name.size())
|
os << "<abstract>\n<para>";
|
||||||
{
|
|
||||||
os << " <para id=\"";
|
|
||||||
this->PrintId(os, prefix.c_str(), op->Name);
|
|
||||||
os << "\"><sect2><title>";
|
|
||||||
cmDocumentationPrintDocbookEscapes(os, op->Name.c_str());
|
|
||||||
os << "</title></sect2> ";
|
|
||||||
}
|
|
||||||
cmDocumentationPrintDocbookEscapes(os, op->Brief.c_str());
|
cmDocumentationPrintDocbookEscapes(os, op->Brief.c_str());
|
||||||
if(op->Name.size())
|
os << "</para>\n</abstract>\n";
|
||||||
{
|
this->PrintFormatted(os, op->Full.c_str());
|
||||||
os << "</para>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(op->Full.size())
|
|
||||||
{
|
|
||||||
// a line break seems to be simply a line break with docbook
|
|
||||||
os << "\n ";
|
|
||||||
this->PrintFormatted(os, op->Full.c_str());
|
|
||||||
}
|
|
||||||
os << "\n";
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->PrintFormatted(os, op->Brief.c_str());
|
||||||
|
}
|
||||||
|
os << "</sect2>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->PrintFormatted(os, op->Brief.c_str());
|
this->PrintFormatted(os, op->Brief.c_str());
|
||||||
os << "\n";
|
|
||||||
++op;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(name)
|
if(name)
|
||||||
|
|
Loading…
Reference in New Issue