diff options
author | albert-github <albert.tests@gmail.com> | 2015-11-02 18:09:48 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2015-11-02 18:09:48 (GMT) |
commit | 09251b805b3c9d96917fedebb3768945d7559b1e (patch) | |
tree | 84253e1354347e2811e7080e78a82f108e6f2f7b /src | |
parent | e2dd83527381c67d38434e5cf1348f2a94887500 (diff) | |
download | Doxygen-09251b805b3c9d96917fedebb3768945d7559b1e.zip Doxygen-09251b805b3c9d96917fedebb3768945d7559b1e.tar.gz Doxygen-09251b805b3c9d96917fedebb3768945d7559b1e.tar.bz2 |
Title in case of USE_MDFILE_AS_MAINPAGE
In case USE_MDFILE_AS_MAINPAGE is used the title in the HTML output is the project name followed by the word documentation and in the index of LATeX / rtf the value is "Main Page", this is even the case when a level 1 header is given. This is a bit contrary to the handling non main pages.
With this patch in case of USE_MDFILE_AS_MAINPAGE and a level 1 header in the beginning of the main page file this level 1 header is used title
Diffstat (limited to 'src')
-rw-r--r-- | src/markdown.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index 9ff139c..818803b 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2363,21 +2363,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; |