来自C#.NET注释的Doxygen注释中的有序列表

时间:2013-01-25 15:56:54

标签: c# doxygen xml-comments doxywizard

我有一些C#文档评论如下:

/// <para>
/// Pre-Conditions:
/// </para>
/// <para>
///     1. The sky must be clear.
/// </para>
/// <para>
///     2. It must be night time.
/// </para>
/// <para>
/// Post-Conditions:
/// </para>
/// <para>
///     1. A picture of the sky will be saved.
/// </para>
/// <para>
///     2. Some second thing will be true that I can't think of.
/// </para>
/// <para>
/// Invariants:
/// </para>
/// <para>
///     1. Existing pictures will not be changed.
/// </para>
void TakePictureOfStars();

我将所有内容都设置为自己的段落,以便在Visual Studio中使用鼠标悬停工具时正确显示。

我使用Doxygen生成评论,但我不断收到以下HTML:

<ol type="1">
    <li>The sky must be clear.</li>
</ol>
<ol type="1">
    <li>It must be night time.</li>
</ol>

看起来像这样:

1. The sky must be clear.

1. It must be night time.

所以,问题是:如何让每个编号的项目在Visual Studio工具提示中显示在自己的行上并在我的代码输出中获得一个有序列表?

1 个答案:

答案 0 :(得分:2)

MARKDOWN_SUPPORT设置为NO将避免1. 2. 3.标记被视为有序列表。

要保留空格,您可以使用<pre></pre>

/// <para><pre>
/// Pre-Conditions:
/// </pre></para>
/// <para><pre>
///     1. The sky must be clear.
/// </pre></para>
/// <para><pre>
///     2. It must be night time.
///        a. half moon
///        b. full moon
/// </pre></para>