summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2015-11-15 11:04:33 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-11-15 11:04:33 (GMT)
commit91b6bf69f380ae6e284dc2c957d2d306b31128db (patch)
tree807c88d096d9bfac6eb9343b8f70240bcdb0fcf1 /src/markdown.cpp
parentb2d6df9a84e1a8318f945e81bd33604774d8e7c6 (diff)
parent09251b805b3c9d96917fedebb3768945d7559b1e (diff)
downloadDoxygen-91b6bf69f380ae6e284dc2c957d2d306b31128db.zip
Doxygen-91b6bf69f380ae6e284dc2c957d2d306b31128db.tar.gz
Doxygen-91b6bf69f380ae6e284dc2c957d2d306b31128db.tar.bz2
Merge pull request #407 from albert-github/feature/bug_main_md_title
Title in case of USE_MDFILE_AS_MAINPAGE
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 26acfbc..f070125 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -2367,21 +2367,22 @@ void MarkdownFileParser::parseInput(const char *fileName,
QCString fn = QFileInfo(fileName).fileName().utf8();
static QCString mdfileAsMainPage = Config_getString("USE_MDFILE_AS_MAINPAGE");
if (id.isEmpty()) id = markdownFileNameToId(fileName);
- if (title.isEmpty()) title = titleFn;
if (!mdfileAsMainPage.isEmpty() &&
(fn==mdfileAsMainPage || // name reference
QFileInfo(fileName).absFilePath()==
QFileInfo(mdfileAsMainPage).absFilePath()) // file reference with path
)
{
- docs.prepend("@mainpage\n");
+ docs.prepend("@mainpage "+title+"\n");
}
else if (id=="mainpage" || id=="index")
{
+ if (title.isEmpty()) title = titleFn;
docs.prepend("@mainpage "+title+"\n");
}
else
{
+ if (title.isEmpty()) title = titleFn;
docs.prepend("@page "+id+" "+title+"\n");
}
int lineNr=1;