1

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/...

3
  • Can you specify the doxygen version you are using, the differences between the standard Doxyfile (doxygen configuration file) and include a, small, code snippet that shows the problem. Commented Apr 8, 2018 at 9:33
  • 1
    How about: [test](%http://www.test.com) ? Commented Apr 9, 2018 at 10:03
  • @albert Thank you! It worked. In our scenario, it's ideal to fix this issue in tooling to avoid changing existing source code. But it's also acceptable if there is a good reason to do so. Is there any document on this from Doxygen? Commented Apr 10, 2018 at 2:03

1 Answer 1

2

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 "\%"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.