diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 3b3dab736..72a819225 100644 --- a/Source/cmDocumentation.cxx +++ b/Source/cmDocumentation.cxx @@ -1350,7 +1350,9 @@ void cmDocumentation ::PrintDocumentationCommand(std::ostream& os, const cmDocumentationEntry &entry) { - cmDocumentationSection *sec = new cmDocumentationSection("",""); + // the string "SingleItem" will be used in a few places to detect the case + // that only the documentation for a single item is printed + cmDocumentationSection *sec = new cmDocumentationSection("SingleItem",""); sec->Append(entry); this->AllSections["temp"] = sec; this->ClearSections(); diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx index 9c633232c..97180476f 100644 --- a/Source/cmDocumentationFormatter.cxx +++ b/Source/cmDocumentationFormatter.cxx @@ -146,6 +146,10 @@ cmDocumentationFormatter::ComputeSectionLinkPrefix(std::string const& name) { return "see"; } + else if(name.find("SingleItem") != name.npos) + { + return "single_item"; + } else { std::cerr diff --git a/Source/cmDocumentationFormatterHTML.cxx b/Source/cmDocumentationFormatterHTML.cxx index a40ce99c6..0f7cc704d 100644 --- a/Source/cmDocumentationFormatterHTML.cxx +++ b/Source/cmDocumentationFormatterHTML.cxx @@ -117,30 +117,37 @@ void cmDocumentationFormatterHTML const cmDocumentationSection §ion, const char* name) { - if(name) - { - os << "
";
- this->PrintHTMLEscapes(os, op->Name.c_str());
- os << "
";
+ this->PrintHTMLEscapes(os, op->Name.c_str());
+ os << "