Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Doxygen escape HTML tags?

Tags:

html

doxygen

I want to include a literal HTML element in a Doxygen comment. Something like this:

/// This function skips all <li> elements

If I write it like that, the <li> is passed to the HTML output, which is obviously not what I want.

Instead, I can write this:

/// This function skips all &lt;li&gt; elements

This works fine in the HTML generated by Doxygen, but now the comment in the source code itself is rather illegible.

So it looks like I have to choose between legibility in the generated documentation or in the source code.

Is that really the case, or is there a way to force Doxygen to automatically turn all <blabla> into &lt;blabla&gt;?

like image 628
oz1cz Avatar asked Jan 13 '23 12:01

oz1cz


1 Answers

You could also have used:

/// This function skips all \<li\> elements

Or (if MARKDOWN_SUPPORT=YES) write:

/// This function skips all `<li>` elements

which are both reasonably readable, or put everything in a \verbatim..\endverbatim section, but then it is also rendered as such.

You could also define an an alias, i.e.

ALIASES = verb{1}="\<\1\>"

And then write

/// This function skips all \verb{li} elements
like image 64
doxygen Avatar answered Jan 23 '23 00:01

doxygen