Pergunta

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)

Foi útil?

Solução

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.

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top