Skip to content

Commit 2fcfe9c

Browse files
committed
Page anchor of directory description
When having a simple file `README.md` and a directory `cmd/boulder-observer`: ``` # boulder-observer A modular configuration driven approach to black box monitoring with Prometheus. * [boulder-observer](#boulder-observer) ``` and the settings: ``` QUIET = YES RECURSIVE = YES MARKDOWN_ID_STYLE = GITHUB ``` We get the warning like: ``` cmd/boulder-observer/README.md:6: warning: unable to resolve reference to 'boulder-observer' for \ref command ``` Due to the type of file and the settings the file was seen as a directory description (`@dir`) but in the mean time the "anchor" of the original page was forgotten.
1 parent bd31ab7 commit 2fcfe9c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/markdown.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3681,6 +3681,10 @@ void MarkdownOutlineParser::parseInput(const QCString &fileName,
36813681
}
36823682
else if (isSubdirDocs)
36833683
{
3684+
if (!generatedId.isEmpty() && !title.isEmpty())
3685+
{
3686+
docs.prepend("@ianchor{" + title + "} " + generatedId + "\\ilinebr ");
3687+
}
36843688
docs.prepend("@dir\\ilinebr ");
36853689
}
36863690
else

0 commit comments

Comments
 (0)