summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 2a6d9d3..ac824f4 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -2292,9 +2292,13 @@ void MarkdownFileParser::parseInput(const char *fileName,
QCString titleFn = QFileInfo(fileName).baseName().utf8();
QCString fn = QFileInfo(fileName).fileName().utf8();
static QCString mdfileAsMainPage = Config_getString("USE_MDFILE_AS_MAINPAGE");
- if (id.isEmpty()) id = markdownFileNameToId(fileName);
+ if (id.isEmpty()) id = markdownFileNameToId(fileName);
if (title.isEmpty()) title = titleFn;
- if (fn==mdfileAsMainPage)
+ if (!mdfileAsMainPage.isEmpty() &&
+ (fn==mdfileAsMainPage || // name reference
+ QFileInfo(fileName).absFilePath()==
+ QFileInfo(mdfileAsMainPage).absFilePath()) // file reference with path
+ )
{
docs.prepend("@mainpage\n");
}