Skip to content

Commit d557c9c

Browse files
committed
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.
1 parent b2f14c3 commit d557c9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/markdown.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2734,8 +2734,8 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
27342734
if (id.startsWith("autotoc_md")) id = "";
27352735
int indentLevel=title.isEmpty() ? 0 : -1;
27362736
markdown.setIndentLevel(indentLevel);
2737-
QCString titleFn = QFileInfo(fileName).baseName().utf8();
27382737
QCString fn = QFileInfo(fileName).fileName().utf8();
2738+
QCString titleFn = stripExtensionGeneral(fn,getFileNameExtension(fn));
27392739
QCString mdfileAsMainPage = Config_getString(USE_MDFILE_AS_MAINPAGE);
27402740
bool wasEmpty = id.isEmpty();
27412741
if (wasEmpty) id = markdownFileNameToId(fileName);

0 commit comments

Comments
 (0)