Escape '*/' in \code blocks

"Barnes, Peter D." <[email protected]>
Newsgroups gmane.text.doxygen.general
Message-ID <[email protected]>
Hello Folks,

I need to escape the sequence `*/‘ inside a code block.

For example, consider a shell command with wildcards:
\code $ ls foo*/ \endcode

The problem, of course, is this is in a C/C++ file, so the delimiter for the Doxygen comment block is `/** … */‘.  The compiler sees the `*/‘ in the code block as the end of the comment block as a whole, and tries to parse the rest of the Doxygen block as code, resulting in lots of parse errors.

While Doxygen has many escapes for special characters, `\/' and `\*' aren’t among them.

I’ve looked at the suggestions in these prior threads, but none of them address this case:

https://sourceforge.net/p/doxygen/mailman/message/12235697/
- Dimitri: use /// instead
	But this doesn’t work with multi-line \code blocks, which
	would all have `///‘ at the left margin of the generated
	docs.


http://stackoverflow.com/questions/24978463/doxygen-escape-nested-comments-in-c
- Use `*//*’ to reopen the comment immediately
	But the extra characters still appear in the documentation.
- Use `&zwj;'
	But these are not removed in parsing \code blocks.

http://doxygen.10944.n7.nabble.com/How-can-I-escape-in-a-comment-td5528.html
- Use `\htmlonly\endhtmlonly’ (or shorter: `<b></b>’)
	As for `&sqj;’, these are not removed in \code blocks.

In fact, experimenting with the other character escapes with `\’, it seems that none of them work in \code blocks.

So, my questions:

0.  Is there some other way to handle `*/‘ in (multi-line) \code blocks?

1.  How hard is it to add `\*’ and/or `\/‘ to the escape list?

2.  How hard is it to add escaping to \code blocks?

Thanks,
Peter


P.S.  There appears to be an error in the Special Commands index:
http://www.doxygen.nl/manual/commands.html

The index lists
	• \&ndash;
	• \&mdash;
But the documentation (and feature) is really \-- and \---

_______________________________________________________________________
Dr. Peter D. Barnes, Jr.                NACS Division
Lawrence Livermore National Laboratory  Physical and Life Sciences
7000 East Avenue, L-50                  email:  [email protected]
P. O. Box 808                           Voice:  (925) 422-3384
Livermore, California 94550             Fax:    (925) 423-3371

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Doxygen-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.