Skip to content

[Bug] [Regression] Markdown link to a source code #region with dashes are silently discarded #8777

Closed
@Arkatufus

Description

@Arkatufus

Describe the bug

Markdown link to a source code #region with dashes are silently discarded

Assuming a source code file:

#region hello-world-message
namespace HelloWorld
{
    public class Greet
    {
        public string Who { get; private set; }

        public Greet(string who)
        {
            Who = who;
        }
    }
}
#endregion

and a markdown link:

[!code-csharp[Main](../../../src/examples/HelloAkka/HelloWorld/Greet.cs?name=hello-world-message)]

This works on v2.59.4, but on v2.67.0, the code region is ignored/discarded without emitting any warnings.

image (1)

Expected behavior
The code snippet should be included, or a warning should be emitted that it is being ignored.

Context (please complete the following information):

  • OS: Windows
  • Docfx version: 2.67.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    markdownAuthoring and presenting content using markdown

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions