Yuby
Yuby

Reputation: 818

disable auto link in Doxygen

If I write some URL in source code comments like:

/**
 * Here is an inline link [test](http://www.test.com).
 * More information:
 * <a href="http://www.test.com">test</a>
 */

I enabled GENERATE_XML in Doxygen. This is what it generates:

<para>Here is an inline link [test](<ulink url="http://www.test.com">http://www.test.com</ulink>).
More information:
<ulink url="http://www.test.com">test</ulink> </para> 

After converting the tags, I can create a Markdown content like:

Here is an inline link [test](<a href="http://www.test.com">http://www.test.com</a>).
More information:
<a href="http://www.test.com">test</a>

Note that the Markdown link [test](<a href="http://www.test.com">http://www.test.com</a>) is polluted, which will break the link after I feed this into another Markdown processor. I need this as I want to write some markdown in comments, and extract it to some structured data formats for other tools to processing the markdown. I have disabled MARKDOWN_SUPPORT in Doxygen.

I have tried disable AUTOLINK_SUPPORT in doxyfile, but it can only disable internal type link to class/method/...

Upvotes: 1

Views: 1584

Answers (1)

albert
albert

Reputation: 9012

Solution for the mentioned problem, auto linking a web address, is to use [test](%http://www.test.com). By means of the % sign the (automatic) linking is suppressed.

In the documentation, paragraph "Step 3: Documenting the sources":

Links are created for words corresponding to documented classes (unless the word is preceded by a %; then the word will not be linked and the % sign is removed).

Note: in the above quote the wording is only for classes but it does work on other places as well. The same "problem" occurs in other places:

  • Description of AUTOLINK_SUPPORT
  • FAQ Doxygen automatically generates a link to the class MyClass somewhere in the running text. How do I prevent that at a certain place?
  • Paragraph Links to classes
  • Paragraph "\%"

Upvotes: 2

Related Questions