Escape '*/' in \code blocks

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Escape '*/' in \code blocks

Barnes, Peter D.
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:

- Dimitri: use /// instead
        But this doesn’t work with multi-line \code blocks, which
        would all have `///‘ at the left margin of the generated

- Use `*//*’ to reopen the comment immediately
        But the extra characters still appear in the documentation.
- Use `‍'
        But these are not removed in parsing \code blocks.

- 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?


P.S.  There appears to be an error in the Special Commands index:

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:  [hidden email]
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
[hidden email]