Skip to content

[Bug] Inheritdoc Rendering Isssue in Sections #10896

@StefanGreve

Description

@StefanGreve

Describe the bug
I have noticed that every time when I use a <inheritdoc> within a <remarks> section, the rendered output looks off. I will give an example for how to reproduce this problem with a remarks reference, but there are also other cases where inheritdoc fails to render the output properly in DocFx (cf. Context, Exhibit 2).

To Reproduce
Steps to reproduce the behavior:

  1. Decorate a function Foo with a doc string, and include a <remarks> section
/// <summary>
///    Foo.
/// </summary>
/// <remarks>
///    Hello <c>World!</c>.
/// </remarks>
public void Foo() => throw new NotImplementedException();
  1. Reference the remark from Foo in Bar:
/// <summary>
///    Bar.
/// </summary>
/// <remarks>
///    <inheritdoc cref="Foo" path="/remarks" />
/// </remarks>
public void Bar() => throw new NotImplementedException();

Expected behavior

The output should look like this:

Remarks

Hello World!.


But instead, it comes out like this:

Remarks

<remarks>
Hello <c>World!</c>.

Context (please complete the following information):

  • OS: Windows
  • Docfx version: 2.78.4

Additional context
Here are some screen shots from a real world application:

Exhibit 1
Image

Exhibit 2
Image

where I used something like

    /// <param name="eventLogOptions">
    ///     <inheritdoc cref="EventLogOptions" path="/summary"/>
    /// </param>

(Edit: Fixed typos (</remarks>).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions