[Doxygen-users] Escape '*/' in \code blocks
Brought to you by:
dimitri
|
From: Barnes, P. D. <bar...@ll...> - 2016-05-31 21:30:05
|
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 `‍' 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 • \– • \— 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: pdb...@ll... P. O. Box 808 Voice: (925) 422-3384 Livermore, California 94550 Fax: (925) 423-3371 |