@@ -575,7 +575,7 @@ void HtmlCodeGenerator::_writeCodeLink(const char *className,
575
575
}
576
576
m_t << " href=\" " ;
577
577
m_t << externalRef (m_relPath,ref,TRUE );
578
- if (f) m_t << f << Doxygen::htmlFileExtension;
578
+ if (f) m_t << f << ( hasExtension (f) ? " " : Doxygen::htmlFileExtension) ;
579
579
if (anchor) m_t << " #" << anchor;
580
580
m_t << " \" " ;
581
581
if (tooltip) m_t << " title=\" " << convertToHtml (tooltip) << " \" " ;
@@ -596,7 +596,7 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
596
596
{
597
597
m_t << " <a href=\" " ;
598
598
m_t << externalRef (m_relPath,docInfo.ref ,TRUE );
599
- m_t << docInfo.url << Doxygen::htmlFileExtension;
599
+ m_t << docInfo.url << ( hasExtension (docInfo. url ) ? " " : Doxygen::htmlFileExtension) ;
600
600
if (!docInfo.anchor .isEmpty ())
601
601
{
602
602
m_t << " #" << docInfo.anchor ;
@@ -628,7 +628,7 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
628
628
{
629
629
m_t << " <a href=\" " ;
630
630
m_t << externalRef (m_relPath,defInfo.ref ,TRUE );
631
- m_t << defInfo.url << Doxygen::htmlFileExtension;
631
+ m_t << defInfo.url << ( hasExtension (docInfo. url ) ? " " : Doxygen::htmlFileExtension) ;
632
632
if (!defInfo.anchor .isEmpty ())
633
633
{
634
634
m_t << " #" << defInfo.anchor ;
@@ -649,7 +649,7 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
649
649
{
650
650
m_t << " <a href=\" " ;
651
651
m_t << externalRef (m_relPath,declInfo.ref ,TRUE );
652
- m_t << declInfo.url << Doxygen::htmlFileExtension;
652
+ m_t << declInfo.url << ( hasExtension (docInfo. url ) ? " " : Doxygen::htmlFileExtension) ;
653
653
if (!declInfo.anchor .isEmpty ())
654
654
{
655
655
m_t << " #" << declInfo.anchor ;
@@ -912,10 +912,7 @@ void HtmlGenerator::startFile(const char *name,const char *,
912
912
lastTitle=title;
913
913
relPath = relativePathToRoot (fileName);
914
914
915
- if (fileName.right (Doxygen::htmlFileExtension.length ())!=Doxygen::htmlFileExtension)
916
- {
917
- fileName+=Doxygen::htmlFileExtension;
918
- }
915
+ fileName+=(hasExtension (fileName) ? " " : Doxygen::htmlFileExtension);
919
916
startPlainFile (fileName);
920
917
m_codeGen.setTextStream (t);
921
918
m_codeGen.setRelativePath (relPath);
@@ -1149,7 +1146,7 @@ void HtmlGenerator::startIndexItem(const char *ref,const char *f)
1149
1146
}
1150
1147
t << " href=\" " ;
1151
1148
t << externalRef (relPath,ref,TRUE );
1152
- if (f) t << f << Doxygen::htmlFileExtension;
1149
+ if (f) t << f << ( hasExtension (f) ? " " : Doxygen::htmlFileExtension) ;
1153
1150
t << " \" >" ;
1154
1151
}
1155
1152
else
@@ -1176,7 +1173,7 @@ void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
1176
1173
{
1177
1174
t << " <li>" ;
1178
1175
if (path) docify (path);
1179
- t << " <a class=\" el\" href=\" " << f << Doxygen::htmlFileExtension << " \" >" ;
1176
+ t << " <a class=\" el\" href=\" " << f << ( hasExtension (f) ? " " : Doxygen::htmlFileExtension) << " \" >" ;
1180
1177
docify (name);
1181
1178
t << " </a> " ;
1182
1179
}
@@ -1195,7 +1192,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
1195
1192
}
1196
1193
t << " href=\" " ;
1197
1194
t << externalRef (relPath,ref,TRUE );
1198
- if (f) t << f << Doxygen::htmlFileExtension;
1195
+ if (f) t << f << ( hasExtension (f) ? " " : Doxygen::htmlFileExtension) ;
1199
1196
if (anchor) t << " #" << anchor;
1200
1197
t << " \" >" ;
1201
1198
docify (name);
@@ -1205,7 +1202,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
1205
1202
void HtmlGenerator::startTextLink (const char *f,const char *anchor)
1206
1203
{
1207
1204
t << " <a href=\" " ;
1208
- if (f) t << relPath << f << Doxygen::htmlFileExtension;
1205
+ if (f) t << relPath << f << ( hasExtension (f) ? " " : Doxygen::htmlFileExtension) ;
1209
1206
if (anchor) t << " #" << anchor;
1210
1207
t << " \" >" ;
1211
1208
}
@@ -2369,7 +2366,7 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa
2369
2366
" <script type=\" text/javascript\" >\n "
2370
2367
" /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n "
2371
2368
" $(document).ready(function(){initNavTree('" ) +
2372
- QCString (name) + Doxygen::htmlFileExtension +
2369
+ QCString (name) + ( hasExtension (name) ? " " : Doxygen::htmlFileExtension) +
2373
2370
QCString (" ','" ) + relpath +
2374
2371
QCString (" ');});\n "
2375
2372
" /* @license-end */\n "
@@ -2807,7 +2804,7 @@ void HtmlGenerator::writeInheritedSectionTitle(
2807
2804
classLink += " href=\" " ;
2808
2805
classLink+=relPath;
2809
2806
}
2810
- classLink+= file+Doxygen::htmlFileExtension+a;
2807
+ classLink=classLink+ file+( hasExtension (file) ? " " : Doxygen::htmlFileExtension) +a;
2811
2808
classLink+=QCString (" \" >" )+convertToHtml (name,FALSE )+" </a>" ;
2812
2809
t << " <tr class=\" inherit_header " << id << " \" >"
2813
2810
<< " <td colspan=\" 2\" onclick=\" javascript:toggleInherit('" << id << " ')\" >"
@@ -2830,7 +2827,7 @@ void HtmlGenerator::writeSummaryLink(const char *file,const char *anchor,const c
2830
2827
if (file)
2831
2828
{
2832
2829
t << relPath << file;
2833
- t << Doxygen::htmlFileExtension;
2830
+ t << ( hasExtension (file) ? " " : Doxygen::htmlFileExtension) ;
2834
2831
}
2835
2832
else
2836
2833
{
0 commit comments