Skip to content

Commit 77feb07

Browse files
committed
A mainpage doesn't have an anchor to jump to
Based on the question: https://stackoverflow.com/questions/59685012/doxygen-markdown-links-to-main-page-do-not-work?noredirect=1#comment105616212_59685012 The markdown mainpage has no anchor so it is not possible to link to it, added an anchor so it is consistent with other page commands.
1 parent 8f71c69 commit 77feb07

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/markdown.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,11 +2660,13 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
26602660
QFileInfo(mdfileAsMainPage).absFilePath()) // file reference with path
26612661
)
26622662
{
2663+
docs.prepend("@anchor " + id + "\n");
26632664
docs.prepend("@mainpage "+title+"\n");
26642665
}
26652666
else if (id=="mainpage" || id=="index")
26662667
{
26672668
if (title.isEmpty()) title = titleFn;
2669+
docs.prepend("@anchor " + id + "\n");
26682670
docs.prepend("@mainpage "+title+"\n");
26692671
}
26702672
else

0 commit comments

Comments
 (0)