From dfccdd65fb61198498f9d3211917afd4788bbc5d Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 23 Apr 2012 17:15:08 -0400 Subject: [PATCH] Documentation: Fix HTML anchor ranges Generate anchors of the form instead of 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. --- Source/cmDocumentationFormatterHTML.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/cmDocumentationFormatterHTML.cxx b/Source/cmDocumentationFormatterHTML.cxx index 6ced1e4d0..ed28b45bf 100644 --- a/Source/cmDocumentationFormatterHTML.cxx +++ b/Source/cmDocumentationFormatterHTML.cxx @@ -127,7 +127,7 @@ void cmDocumentationFormatterHTML { os << "

" << name << "

\n"; + os << "\">" << name << "\n"; } // Is a list needed? @@ -167,9 +167,9 @@ void cmDocumentationFormatterHTML { os << " Name.c_str()); - os << "\">"; + os << "\">"; this->PrintHTMLEscapes(os, op->Name.c_str()); - os << ": "; + os << ": "; } this->PrintHTMLEscapes(os, op->Brief.c_str()); if(op->Full.size()) @@ -269,9 +269,9 @@ void cmDocumentationFormatterHTML return; } - os << "

Master Index " + os << "

Master Index " << "CMake " << cmVersion::GetCMakeVersion() - << "

\n"; + << "

\n"; if (!sections.empty()) {