diff options
| author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-05-05 17:38:19 (GMT) |
|---|---|---|
| committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-05-05 17:38:19 (GMT) |
| commit | a00f1beb530c0c9fff8deab150a07b4c3839285b (patch) | |
| tree | 61b229fb9aaa91fdb34622498533ebd25c9160e5 /Source/cmDocumentationFormatterDocbook.cxx | |
| parent | f3ca3d139c21aacb75fbe2a7bb8291967d6dab07 (diff) | |
| download | CMake-2.6.0.zip CMake-2.6.0.tar.gz CMake-2.6.0.tar.bz2 | |
ENH: merge in changes for generated docsv2.6.0
Diffstat (limited to 'Source/cmDocumentationFormatterDocbook.cxx')
| -rw-r--r-- | Source/cmDocumentationFormatterDocbook.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmDocumentationFormatterDocbook.cxx b/Source/cmDocumentationFormatterDocbook.cxx index 65f4bf8..1c648a6 100644 --- a/Source/cmDocumentationFormatterDocbook.cxx +++ b/Source/cmDocumentationFormatterDocbook.cxx @@ -129,6 +129,8 @@ void cmDocumentationFormatterDocbook } } + std::string prefix = this->ComputeSectionLinkPrefix(name); + const std::vector<cmDocumentationEntry> &entries = section.GetEntries(); @@ -138,7 +140,7 @@ void cmDocumentationFormatterDocbook { if(op->Name.size()) { - os << " <listitem><link linkend=\"command_"; + os << " <listitem><link linkend=\"" << prefix << "_"; cmDocumentationPrintDocbookEscapes(os, op->Name.c_str()); os << "\"><emphasis><literal>"; cmDocumentationPrintDocbookEscapes(os, op->Name.c_str()); @@ -156,15 +158,15 @@ void cmDocumentationFormatterDocbook { if(op->Name.size()) { - os << " <para id=\"command_"; + os << " <para id=\"" << prefix << "_"; cmDocumentationPrintDocbookEscapes(os, op->Name.c_str()); - // make sure that each id exists only once, e.g. - // command_COMPILE_DEFINITIONS exists at least twice. Since it seems + // make sure that each id exists only once. Since it seems // not easily possible to determine which link refers to which id, // we have at least to make sure that the duplicated id's get a // different name (by appending an increasing number), Alex - std::string id = "command_"; + std::string id = prefix; + id += "_"; id += op->Name; if (this->EmittedLinkIds.find(id) == this->EmittedLinkIds.end()) { |
