summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-04-23 21:15:08 (GMT)
committerBrad King <brad.king@kitware.com>2012-04-26 20:29:56 (GMT)
commitdfccdd65fb61198498f9d3211917afd4788bbc5d (patch)
tree4906e055e471104e77566dabc1bc0115b047dd9f /Source
parent5771dd2f15f871eb44b31fa84d67fa587654b770 (diff)
downloadCMake-dfccdd65fb61198498f9d3211917afd4788bbc5d.zip
CMake-dfccdd65fb61198498f9d3211917afd4788bbc5d.tar.gz
CMake-dfccdd65fb61198498f9d3211917afd4788bbc5d.tar.bz2
Documentation: Fix HTML anchor ranges
Generate anchors of the form <a name="..."></a> instead of <a name="..."/> to ensure browsers know that the anchor contains no text and do not try to guess an end of the range. Also make the "section_Index" and item label anchors empty instead of containing the section header or label text. This ensures that the text associated with target anchors is not rendered as if it were a hyperlink.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmDocumentationFormatterHTML.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmDocumentationFormatterHTML.cxx b/Source/cmDocumentationFormatterHTML.cxx
index 6ced1e4..ed28b45 100644
--- a/Source/cmDocumentationFormatterHTML.cxx
+++ b/Source/cmDocumentationFormatterHTML.cxx
@@ -127,7 +127,7 @@ void cmDocumentationFormatterHTML
{
os << "<h2><a name=\"section_";
cmDocumentationPrintHTMLId(os, name);
- os << "\"/>" << name << "</h2>\n";
+ os << "\"></a>" << name << "</h2>\n";
}
// Is a list needed?
@@ -167,9 +167,9 @@ void cmDocumentationFormatterHTML
{
os << " <a name=\"" << prefix << ":";
cmDocumentationPrintHTMLId(os, op->Name.c_str());
- os << "\"><b><code>";
+ os << "\"></a><b><code>";
this->PrintHTMLEscapes(os, op->Name.c_str());
- os << "</code></b></a>: ";
+ os << "</code></b>: ";
}
this->PrintHTMLEscapes(os, op->Brief.c_str());
if(op->Full.size())
@@ -269,9 +269,9 @@ void cmDocumentationFormatterHTML
return;
}
- os << "<h2><a name=\"section_Index\">Master Index "
+ os << "<h2><a name=\"section_Index\"></a>Master Index "
<< "CMake " << cmVersion::GetCMakeVersion()
- << "</a></h2>\n";
+ << "</h2>\n";
if (!sections.empty())
{