Skip to content

Commit 0dcaeed

Browse files
committed
issue doxygen#12169 Problems with links in markdown headers when using USE_MDFILE_AS_MAINPAGE
1 parent fcc0ba3 commit 0dcaeed

3 files changed

Lines changed: 3 additions & 20 deletions

File tree

src/index.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3992,18 +3992,7 @@ static void countRelatedPages(int &docPages,int &indexPages)
39923992

39933993
//----------------------------------------------------------------------------
39943994

3995-
static bool mainPageHasOwnTitle()
3996-
{
3997-
QCString projectName = Config_getString(PROJECT_NAME);
3998-
QCString title;
3999-
if (Doxygen::mainPage)
4000-
{
4001-
title = filterTitle(Doxygen::mainPage->title());
4002-
}
4003-
return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4004-
}
4005-
4006-
static void writePages(PageDef *pd,FTVHelp *ftv)
3995+
static void writePages(PageDef *pd,FTVHelp *ftv,bool reuseRoot = false)
40073996
{
40083997
//printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
40093998
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
@@ -4040,8 +4029,7 @@ static void writePages(PageDef *pd,FTVHelp *ftv)
40404029
}
40414030
}
40424031
if (hasSubPages && ftv) ftv->incContentsDepth();
4043-
bool doIndent = (hasSections || hasSubPages) &&
4044-
(pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
4032+
bool doIndent = (hasSections || hasSubPages) && !reuseRoot;
40454033
if (doIndent)
40464034
{
40474035
Doxygen::indexList->incContentsDepth();
@@ -4980,7 +4968,7 @@ static void writeIndex(OutputList &ol)
49804968
}
49814969
if (hasSubs)
49824970
{
4983-
writePages(Doxygen::mainPage.get(),nullptr);
4971+
writePages(Doxygen::mainPage.get(),nullptr,!hasTitle);
49844972
}
49854973
}
49864974

templates/html/doxygen.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ dt.alphachar{
227227

228228
a {
229229
color: var(--page-link-color);
230-
font-weight: normal;
231230
text-decoration: none;
232231
}
233232

templates/html/navtree.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
line-height: 22px;
4747
}
4848

49-
#nav-tree .label a {
50-
padding:2px;
51-
}
52-
5349
#nav-tree .selected a {
5450
text-decoration:none;
5551
color:var(--page-link-color);

0 commit comments

Comments
 (0)