summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2021-01-05 11:24:41 (GMT)
committeralbert-github <albert.tests@gmail.com>2021-01-05 11:24:41 (GMT)
commitd557c9cc9aed41c305af5c10524e3dad1a902539 (patch)
tree570fefdc6d02da273642915a599133ba0413e9c0 /src/markdown.cpp
parentb2f14c3c6410c0b57bb12bddc806c91b6200df7a (diff)
downloadDoxygen-d557c9cc9aed41c305af5c10524e3dad1a902539.zip
Doxygen-d557c9cc9aed41c305af5c10524e3dad1a902539.tar.gz
Doxygen-d557c9cc9aed41c305af5c10524e3dad1a902539.tar.bz2
Incorrect entries on treeview
When having e.g. markdown files like: ``` 0.3.1.md 0.3.2.md ``` we get in the treeview twice the item "0" instead of the, more, expected "0.3.1" and "0.3.2". This is due to the fact that the filename is seen as `0` and the extension `.3.1.md` and `.3.2.md` instead of filename `0.3.1` and `0.3.2` and extension in both cases `.md`. The problem was found by Fossies in the Buildbot project.
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 340ac99..93d143d 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -2734,8 +2734,8 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
if (id.startsWith("autotoc_md")) id = "";
int indentLevel=title.isEmpty() ? 0 : -1;
markdown.setIndentLevel(indentLevel);
- QCString titleFn = QFileInfo(fileName).baseName().utf8();
QCString fn = QFileInfo(fileName).fileName().utf8();
+ QCString titleFn = stripExtensionGeneral(fn,getFileNameExtension(fn));
QCString mdfileAsMainPage = Config_getString(USE_MDFILE_AS_MAINPAGE);
bool wasEmpty = id.isEmpty();
if (wasEmpty) id = markdownFileNameToId(fileName);