NuGet / NuGetGallery

NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
https://www.nuget.org/
Apache License 2.0
1.54k stars 643 forks source link

[NuGet.org Bug]: Markdown links not rendered correctly #9823

Closed gregsdennis closed 5 months ago

gregsdennis commented 7 months ago

Impact

It bothers me. A fix would be nice

Describe the bug

It appears markdown links aren't being processed at all.

The text

This library conforms to the IETF JSON Path specification [RFC 9535](https://www.rfc-editor.org/rfc/rfc9535.html).

should be rendered as it does on GitHub:

This library conforms to the IETF JSON Path specification RFC 9535.

However, it appears to be unprocessed and the plain text is rendering.

Repro Steps

Visible with the package: https://www.nuget.org/packages/JsonPath.Net/1.0.0#readme-body-tab

Expected Behavior

I expect the markdown link to be processed.

Screenshots

image

Additional Context and logs

I'm setting this readme in the .csproj file. Maybe there's something going on with the XML translation and I'm just doing it wrong.

https://github.com/gregsdennis/json-everything/blob/106ff1dcf91ff8d79b61dbedc1d0e1704b3e714e/JsonPath/JsonPath.csproj#L10-L16

erdembayar commented 5 months ago

@gregsdennis Thank you for filing this issue. Unfortunately, below is not proper markdown, please don't put in csproj file. https://github.com/gregsdennis/json-everything/blob/106ff1dcf91ff8d79b61dbedc1d0e1704b3e714e/JsonPath/JsonPath.csproj#L10-L16

Could you please take a look at this package where it done properly? https://www.nuget.org/packages/Newtonsoft.Json#readme-body-tab

You need to create actual Readme.md file and put it in there, please check for Readme best practices.

gregsdennis commented 5 months ago

Are you saying I need to create a separate readme for the nuget packages? I have a readme for the entire project which is not suitable for packages as the project published multiple nuget packages.

gregsdennis commented 5 months ago

below is not proper markdown

Pedantically, it is proper markdown. Are you saying that markdown just isn't supported when the text is defined directly in the csproj? If so, I suppose that's what this issue is about.

Since Nuget READMEs permit markdown and the <Description> tag contents act as a README, it follows that markdown should be supported in the <Description> tag.

erdembayar commented 5 months ago

below is not proper markdown

Pedantically, it is proper markdown. Are you saying that markdown just isn't supported when the text is defined directly in the csproj? If so, I suppose that's what this issue is about.

Since Nuget READMEs permit markdown and the <Description> tag contents act as a README, it follows that markdown should be supported in the <Description> tag.

Here is our document for description: https://learn.microsoft.com/en-us/nuget/reference/nuspec#description. You can define it using either a nuspec file or a csproj file, as they are both XML files. It doesn't say it supports markdown in it.