summaryrefslogtreecommitdiffstats
path: root/src/htmldocvisitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r--src/htmldocvisitor.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 513c3a4..228880a 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -1913,11 +1913,7 @@ void HtmlDocVisitor::visitPre(DocSecRefItem *ref)
{
if (m_hide) return;
QCString refName=ref->file();
- if (refName.right(Doxygen::htmlFileExtension.length())!=
- QCString(Doxygen::htmlFileExtension))
- {
- refName+=Doxygen::htmlFileExtension;
- }
+ refName+=(hasExtension(refName) ? "" : Doxygen::htmlFileExtension);
m_t << "<li><a href=\"" << refName << "#" << ref->anchor() << "\">";
}
@@ -2098,7 +2094,7 @@ void HtmlDocVisitor::visitPre(DocXRefItem *x)
{
m_t << "<dl" << getDirHtmlClassOfNode(getTextDirByConfig(x), x->key())
<< "><dt><b><a class=\"el\" href=\""
- << x->relPath() << x->file() << Doxygen::htmlFileExtension
+ << x->relPath() << x->file() << (hasExtension(x->file()) ? "" : Doxygen::htmlFileExtension)
<< "#" << x->anchor() << "\">";
}
else
@@ -2262,7 +2258,10 @@ void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file,
}
m_t << "href=\"";
m_t << externalRef(relPath,ref,TRUE);
- if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension;
+ if (!file.isEmpty())
+ {
+ m_t << file << (hasExtension(file) ? "" : Doxygen::htmlFileExtension);
+ }
if (!anchor.isEmpty()) m_t << "#" << anchor;
m_t << "\"";
if (!tooltip.isEmpty()) m_t << " title=\"" << convertToHtml(tooltip) << "\"";