Skip to content

Commit 91b6bf6

Browse files
author
Dimitri van Heesch
committed
Merge pull request doxygen#407 from albert-github/feature/bug_main_md_title
Title in case of USE_MDFILE_AS_MAINPAGE
2 parents b2d6df9 + 09251b8 commit 91b6bf6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/markdown.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,21 +2367,22 @@ void MarkdownFileParser::parseInput(const char *fileName,
23672367
QCString fn = QFileInfo(fileName).fileName().utf8();
23682368
static QCString mdfileAsMainPage = Config_getString("USE_MDFILE_AS_MAINPAGE");
23692369
if (id.isEmpty()) id = markdownFileNameToId(fileName);
2370-
if (title.isEmpty()) title = titleFn;
23712370
if (!mdfileAsMainPage.isEmpty() &&
23722371
(fn==mdfileAsMainPage || // name reference
23732372
QFileInfo(fileName).absFilePath()==
23742373
QFileInfo(mdfileAsMainPage).absFilePath()) // file reference with path
23752374
)
23762375
{
2377-
docs.prepend("@mainpage\n");
2376+
docs.prepend("@mainpage "+title+"\n");
23782377
}
23792378
else if (id=="mainpage" || id=="index")
23802379
{
2380+
if (title.isEmpty()) title = titleFn;
23812381
docs.prepend("@mainpage "+title+"\n");
23822382
}
23832383
else
23842384
{
2385+
if (title.isEmpty()) title = titleFn;
23852386
docs.prepend("@page "+id+" "+title+"\n");
23862387
}
23872388
int lineNr=1;

0 commit comments

Comments
 (0)