dotnet / dotnet/docfx

[Bug] Inheritdoc Rendering Isssue in Sections

Open
#10,896 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**Describe the bug**
I have noticed that every time when I use a `` within a `` 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 `` section

```csharp
///
/// Foo.
///
///
/// Hello World!.
///
public void Foo() => throw new NotImplementedException();
```

2. Reference the remark from `Foo` in `Bar`:

```csharp
///
/// Bar.
///
///
///
///
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

```

Hello World!.
```

**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

```csharp
///
///
///
```

(Edit: Fixed typos (``).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.