diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-10-13 15:31:22 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-10-13 15:45:19 (GMT) |
commit | 1a0a120b75c28b515cacb021d48d78c18a18b19b (patch) | |
tree | 2f23c3b0afb9aa9dc09a37d76e3866a15525be20 /src | |
parent | 6bb9ee4fee7eb850594f89638a492b0c2f60a68d (diff) | |
download | Doxygen-1a0a120b75c28b515cacb021d48d78c18a18b19b.zip Doxygen-1a0a120b75c28b515cacb021d48d78c18a18b19b.tar.gz Doxygen-1a0a120b75c28b515cacb021d48d78c18a18b19b.tar.bz2 |
Allow links to other markdown pages of the form [link text](page.md)
Diffstat (limited to 'src')
-rw-r--r-- | src/markdown.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index 19c9187..eb5a2a2 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -850,9 +850,15 @@ static int processLink(GrowBuf &out,const char *data,int,int size) } else { - if (link.find("@ref ")!=-1 || link.find("\\ref ")!=-1) + SrcLangExt lang = getLanguageFromFileName(link); + int lp=-1; + if ((lp=link.find("@ref "))!=-1 || (lp=link.find("\\ref "))!=-1 || lang==SrcLangExt_Markdown) // assume doxygen symbol link { + if (lp==-1) // link to markdown page + { + out.addStr("@ref "); + } out.addStr(link); out.addStr(" \""); if (explicitTitle && !title.isEmpty()) |