diff options
author | albert-github <albert.tests@gmail.com> | 2020-01-14 13:57:32 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-01-14 13:57:32 (GMT) |
commit | 77feb077388e2539c17b9709750553d7454626f2 (patch) | |
tree | 436988d6bc068f58b4624a2607d465235ece6a70 /src/markdown.cpp | |
parent | 8f71c69d1517f5259652a739830c732983d118aa (diff) | |
download | Doxygen-77feb077388e2539c17b9709750553d7454626f2.zip Doxygen-77feb077388e2539c17b9709750553d7454626f2.tar.gz Doxygen-77feb077388e2539c17b9709750553d7454626f2.tar.bz2 |
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.
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r-- | src/markdown.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index aa64aa2..d0262b3 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2660,11 +2660,13 @@ void MarkdownOutlineParser::parseInput(const char *fileName, QFileInfo(mdfileAsMainPage).absFilePath()) // file reference with path ) { + docs.prepend("@anchor " + id + "\n"); docs.prepend("@mainpage "+title+"\n"); } else if (id=="mainpage" || id=="index") { if (title.isEmpty()) title = titleFn; + docs.prepend("@anchor " + id + "\n"); docs.prepend("@mainpage "+title+"\n"); } else |