Menu

Bug with C# code examples?

BlaBlub
2012-09-10
2013-06-11
  • BlaBlub

    BlaBlub - 2012-09-10

    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.

     
  • BlaBlub

    BlaBlub - 2012-09-12

    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.

     
  • Anonymous

    Anonymous - 2013-03-16

    It works fine to add a  <remarks>-section before the <example>-section.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.