summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentationFormatterHTML.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-10-24 15:36:47 (GMT)
committerKen Martin <ken.martin@kitware.com>2007-10-24 15:36:47 (GMT)
commitc2f0aac146f6b990940240891b959dc1f394e80c (patch)
treeeeda2906ff2af93817dd86f95648e78d90fde45d /Source/cmDocumentationFormatterHTML.cxx
parent328615716c97531b7ccdb2b35679fe828ed27e0c (diff)
downloadCMake-c2f0aac146f6b990940240891b959dc1f394e80c.zip
CMake-c2f0aac146f6b990940240891b959dc1f394e80c.tar.gz
CMake-c2f0aac146f6b990940240891b959dc1f394e80c.tar.bz2
ENH: some more cleanup, fixes, and patch for HTML output
Diffstat (limited to 'Source/cmDocumentationFormatterHTML.cxx')
-rw-r--r--Source/cmDocumentationFormatterHTML.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/Source/cmDocumentationFormatterHTML.cxx b/Source/cmDocumentationFormatterHTML.cxx
index 3451183..a1745d3 100644
--- a/Source/cmDocumentationFormatterHTML.cxx
+++ b/Source/cmDocumentationFormatterHTML.cxx
@@ -97,6 +97,21 @@ void cmDocumentationFormatterHTML
const std::vector<cmDocumentationEntry> &entries =
section.GetEntries();
+
+ os << "<ul>\n";
+ for(std::vector<cmDocumentationEntry>::const_iterator op
+ = entries.begin(); op != entries.end(); ++ op )
+ {
+ if(op->Name.size())
+ {
+ os << " <li><a href=\"#command_"
+ << op->Name.c_str() << "\"><b><code>";
+ this->PrintHTMLEscapes(os, op->Name.c_str());
+ os << "</code></b></a></li>";
+ }
+ }
+ os << "</ul>\n" ;
+
for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
op != entries.end();)
{
@@ -108,9 +123,10 @@ void cmDocumentationFormatterHTML
os << " <li>\n";
if(op->Name.size())
{
- os << " <b><code>";
+ os << " <a name=\"command_"<<
+ op->Name.c_str() << "\"><b><code>";
this->PrintHTMLEscapes(os, op->Name.c_str());
- os << "</code></b>: ";
+ os << "</code></b></a>: ";
}
this->PrintHTMLEscapes(os, op->Brief.c_str());
if(op->Full.size())