문제

I am using doxygen to create a HTML documentation for a C++ library.

Right now I have the problem that code listings created with \code ... \endcode produce listings where each line starts with an asterisk.

Example:

Have a look at the following code sample:
\code
int a = 5;
int b = func(a);
\endcode

Output:

Have a look at the following code sample:
* int a = 5;
* int b = func(a);

I cannot explain this behaviour -- especially because I use /// instead of /** to mark lines as doxygen documentation. The issue happens for both formattings though. Does anyone know how to resolve this? (I am using doxygen 1.8.5)

도움이 되었습니까?

해결책

This is indeed an unfortunate regression in 1.8.5.

I've just pushed a fix to GitHub. Please let me know if it fixes the problem.

다른 팁

It seems this is a bug. Bugzilla entry. Also this bug could be related.

I managed to get a workaround by changing the following snippet

/// Have a look at the following code sample:
/// \code
/// int a = 5;
/// int b = func(a);
/// \endcode

to the following (note that there are only two slashes):

/// Have a look at the following code sample:
// \code   
// int a = 5;
// int b = func(a);
/// \endcode

I am not happy with this because it requires to re-layout all comments and the formatting feels very much unnatural.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top