Nested region tags are stripped from imported C# code using `code-csharp`
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 11m
- Merged PRs (30d)
- 10
Description
**DocFX Version Used**: 2.21.1
**Steps to Reproduce**:
1. Create C# file with nested regions such as:
```csharp
#region OUTER
public class Foo{
#region INNER
// hello
#endregion
}
#endregion
```
2. Import the cshrap into markdown using the DFM syntax, selecting the outer region.
`[!code-csharp[Main](testfile.cs#OUTER)]`
**Expected Behavior**:
Contents of the `OUTER` region are displayed.
```csharp
public class Foo{
#region INNER
// hello
#endregion
}
```
**Actual Behavior**:
The `INNER` region tags (both start and end) are dropped.
```csharp
public class Foo{
//hello
}
```
Including the whole file, or including the range with line numbers works as expected (regions are not dropped).
Contributor guide
Assessment
This issue has not been assessed yet.