8000 Some markdown-formatted remarks are ported into triple slash comments with invalid structure · Issue #68 · dotnet/api-docs-sync · GitHub
[go: up one dir, main page]

Skip to content
Some markdown-formatted remarks are ported into triple slash comments with invalid structure #68
Open
@jeffhandley

Description

@jeffhandley

As seen in MemoryManager<T> from System.Memory in dotnet/runtime, some <remarks> sections are getting produced with invalid structure, and duplicated content.

From `MemoryManager`1.xml`

  <Docs>
    <typeparam name="T">The type of items in the memory buffer managed by this memory manager.</typeparam>
    <summary>An abstract base class that is used to replace the implementation of <see cref="T:System.Memory`1" />.</summary>
    <remarks>
      <format type="text/markdown"><![CDATA[  

The `MemoryManager<T>` class is used to extend the knowledge of types that <xref:System.Memory%601> is able to represent. For example, you can derive from `MemoryManager<T>` to allow <xref:System.Memory%601> to be backed by a <xref:System.Runtime.InteropServices.SafeHandle>.

> [!NOTE]
> The `MemoryManager<T>` class is intended for advanced scenarios. Most developers do not need to use it.

       ]]></format>
    </remarks>
  </Docs>

Before porting the docs into triple slash comments, this was the content of MemoryManager.cs:

    /// <summary>
    /// Manager of <see cref="System.Memory{T}"/> that provides the implementation.
    /// </summary>
    public abstract class MemoryManager<T> : IMemoryOwner<T>, IPinnable

After porting, this is the result:

    /// <summary>An abstract base class that is used to replace the implementation of <see cref="System.Memory{T}" />.</summary>
    /// <typeparam name="T">The type of items in the memory buffer managed by this memory manager.</typeparam>
    /// <remarks>The `MemoryManager<T>` class is used to extend the knowledge of types that <see cref="System.Memory{T}" /> is able to represent. For example, you can derive from `MemoryManager<T>` to allow <see cref="System.Memory{T}" /> to be backed by a <see cref="System.Runtime.InteropServices.SafeHandle" />.
    /// <format type="text/markdown"><![CDATA[
    /// > [!NOTE]
    /// > The `MemoryManager<T>` class is intended for advanced scenarios. Most developers do not need to use it.
    /// ]]></format></remarks>
    public abstract class MemoryManager<T> : IMemoryOwner<T>, IPinnable

The <remarks> section has the content duplicated, once inside the <format> and once before it, which is an invalid structure.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0