I use doxygen (1.8.2) for documenting my C# libs. I want to add code examples in the documentation for some methods. The form is basically as follows:
/// <summary>
/// some text
/// </summary>
/// <param>…</param>
/// <example>
/// <code>
/// void foo(int x)
/// {
/// do something
/// }
/// </code>
/// </example>
This works for some methods. The generated HTML contains a <div> with some <span>'s with format settings (color, font, etc). But in some cases (that are similar in the documenting comments) the generated HTML just contains a <p> with a <code> in it, so there is no layout. The code section is in no box and there is no indentation or line-break. I wonder why some <code>-Tags are not converted correctly to HTML.
Somebody can tell something about it? I guess it is a bug.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The bug is gone if I add a <remarks>-section before the <example>-section. Even if this section is empty. I use this workaround now but maybe this bug should be fixed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2013-03-16
It works fine to add a <remarks>-section before the <example>-section.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I use doxygen (1.8.2) for documenting my C# libs. I want to add code examples in the documentation for some methods. The form is basically as follows:
/// <summary>
/// some text
/// </summary>
/// <param>…</param>
/// <example>
/// <code>
/// void foo(int x)
/// {
/// do something
/// }
/// </code>
/// </example>
This works for some methods. The generated HTML contains a <div> with some <span>'s with format settings (color, font, etc). But in some cases (that are similar in the documenting comments) the generated HTML just contains a <p> with a <code> in it, so there is no layout. The code section is in no box and there is no indentation or line-break. I wonder why some <code>-Tags are not converted correctly to HTML.
Somebody can tell something about it? I guess it is a bug.
The bug is gone if I add a <remarks>-section before the <example>-section. Even if this section is empty. I use this workaround now but maybe this bug should be fixed.
It works fine to add a <remarks>-section before the <example>-section.