Commit 1a0a120b authored by Dimitri van Heesch's avatar Dimitri van Heesch

Allow links to other markdown pages of the form [link text](page.md)

parent 6bb9ee4f
...@@ -449,7 +449,7 @@ If a page has a label you can link to it using \ref cmdref "\@ref" as ...@@ -449,7 +449,7 @@ If a page has a label you can link to it using \ref cmdref "\@ref" as
is shown above. To refer to a markdown page without is shown above. To refer to a markdown page without
such label you can simple use the file name of the page, e.g. such label you can simple use the file name of the page, e.g.
See [the other page](@ref other.md) for more info. See [the other page](other.md) for more info.
\subsection md_html_blocks Treatment of HTML blocks \subsection md_html_blocks Treatment of HTML blocks
......
...@@ -850,9 +850,15 @@ static int processLink(GrowBuf &out,const char *data,int,int size) ...@@ -850,9 +850,15 @@ static int processLink(GrowBuf &out,const char *data,int,int size)
} }
else 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 // assume doxygen symbol link
{ {
if (lp==-1) // link to markdown page
{
out.addStr("@ref ");
}
out.addStr(link); out.addStr(link);
out.addStr(" \""); out.addStr(" \"");
if (explicitTitle && !title.isEmpty()) if (explicitTitle && !title.isEmpty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment