Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to break long URLs in Doxygen comments to satisfy maximum line length?

Tags:

doxygen

The coding guidelines of programming language limit the line length, e.g. to 80 characters. How can I add a URL that is longer than that limit to Doxygen comments? How do I tell Doxygen that multiple lines are to be joined to form the actual link?

Example:

##
# @file  mycode.py
# @sa    See the documentation: http://some.host.some.domain/and_here
#        _we_have_a_very_long_URL_that_can_not_be_written_in_one_line
#        _because_it_would_exceed_the_line_length_limit

The example above doesn't work, and it doesn't work either to end the lines with a backslash (the backslash is just copied to the documentation).

like image 978
holger Avatar asked Jun 19 '13 07:06

holger


2 Answers

You can try it this way. It worked for me. However I'm not a 100% sure its going to work for you. Our IDE use whitespaces as indentation and not tabs. So when you break the line, hence the link, it might not work.

<a href="http://stackoverflow.com/questions/9098680/
doxygen-link-to-a-url-doesnt-generate-the-link-correctly">
link
</a>

like image 62
aldr Avatar answered Sep 16 '22 14:09

aldr


You could use an alias to abbreviate the long URL, i.e.

##
# @file  mycode.py
# @sa    See the documentation: @longurl

and in the Doxyfile define

ALIASES = longurl="http://some.host.some.domain/and_here/..."
like image 29
doxygen Avatar answered Sep 20 '22 14:09

doxygen