Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Opening angle bracket not escaped in Markdown output #9950

Open
alexeyzimarev opened this issue May 25, 2024 · 1 comment
Open

[Bug] Opening angle bracket not escaped in Markdown output #9950

alexeyzimarev opened this issue May 25, 2024 · 1 comment
Labels
bug A bug to fix

Comments

@alexeyzimarev
Copy link

Describe the bug
When using docfx metadata to generate Markdown output, most of the Markdown-supported characters are properly escaped with \. However, opening angle brackets aren't escaped, which causes some static site generators to fail as they expect an HTML tag when processing opening angle brackets.

To Reproduce
Use a config file similar to this, with outputFormat set to markdown:

{
    "metadata": [
        {
            "src": [{
                "files": ["*.dll"],
                "src": "./output"
              }],
            "dest": "docs/docs/api",
            "outputFormat": "markdown"
        }
    ]
}

Run docfx metadata. Inspect Markdown output.

Notice that opening angle brackets aren't escaped, whilst closing angle brackets are:

#### Implements

[IReadOnlyCollection<Parameter\>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection\-1), 
[IEnumerable<Parameter\>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable\-1), 

Expected behavior

Output like this:

#### Implements

[IReadOnlyCollection\<Parameter\>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection\-1), 
[IEnumerable\<Parameter\>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable\-1), 

Context:

  • OS: macOS 14.5
  • Docfx version: 2.76.0
@alexeyzimarev alexeyzimarev added the bug A bug to fix label May 25, 2024
@filzrev
Copy link
Contributor

filzrev commented May 26, 2024

These appear to be the same issues reported in #9719.

However, opening angle brackets aren't escaped, which causes some static site generators to fail as they expect an HTML tag when processing opening angle brackets.

Currently markdown output format is intended to be used as input for docfx build command.
And following problems are known other than #9719 when markdown files are used by other tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix
Projects
None yet
Development

No branches or pull requests

2 participants