Skip to content

Commit

Permalink
Title in case of USE_MDFILE_AS_MAINPAGE
Browse files Browse the repository at this point in the history
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
  • Loading branch information
albert-github committed Nov 2, 2015
1 parent e2dd835 commit 09251b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/markdown.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 09251b8

Please sign in to comment.