summaryrefslogtreecommitdiffstats
path: root/src/htmldocvisitor.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-12-25 09:38:29 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-12-25 09:38:29 (GMT)
commitb294263f69f56feee519fb95d71e504ea7682c5e (patch)
tree456723a2d2f7ac707879e0eb99b9dbfc5d6565cf /src/htmldocvisitor.cpp
parent8f0b7ebff445ff1fa42adbfbb1a90dce4ec777d9 (diff)
parentcbbd26b39cf63148b25d40498f0ab174e6094df7 (diff)
downloadDoxygen-b294263f69f56feee519fb95d71e504ea7682c5e.zip
Doxygen-b294263f69f56feee519fb95d71e504ea7682c5e.tar.gz
Doxygen-b294263f69f56feee519fb95d71e504ea7682c5e.tar.bz2
Merge branch 'feature/bug_335614' of https://github.com/albert-github/doxygen into albert-github-feature/bug_335614
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 6312a65..543d604 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) << "\"";