NuGetGallery icon indicating copy to clipboard operation
NuGetGallery copied to clipboard

[NuGet.org Bug]: HTML / XML comments `<!-- -->` in a preformatted area of a README markdown text are disappeared

Open jsakamoto opened this issue 3 years ago • 2 comments

Impact

It bothers me. A fix would be nice

Describe the bug

HTML comments <!-- --> in a preformatted area of a README markdown text are disappeared.

Some of my "README" markdown texts include sample HTML codes with the comments to explain what the sample code will do, like this.
(The screenshot below was taken on my GitHub repository https://github.com/jsakamoto/BlazorWasmPreRendering.Build#hosting-environment .)

image

However, even though the same README text, only the HTML comments are disappeared on nuget.org even though the other HTML tags are still kept.
(The screenshot below was taken on nuget.org https://www.nuget.org/packages/BlazorWasmPreRendering.Build/ .)

image

That sample HTML code in a README on nuget.org became no longer makes sense as a sample code due to be invisible the explaining comments.

Repro Steps

  1. Write a "Readme" on the package editor form on the nuget.org like this:

     ```html
     <!-- This is comment -->
     <div>Hello</div>
     ```
    
  2. Click the "Preview" button. Then, the preview screen renders only the <div>Hello</div> tag.

     <div>Hello</div>
    

Expected Behavior

I expected the HTML comment also to be rendered in the preview screen like this, because the comment is written in the preformatted area.

<!-- This is comment -->
<div>Hello</div>

Screenshots

Editing

image

Previewing

image

Additional Context and logs

No response

jsakamoto avatar Mar 16 '22 06:03 jsakamoto

@jsakamoto , thanks for providing suggestion and feedback. we are working on markdown experience improvement on Nuget.org, appreciate your feedback. Please let us know if you have more other suggestions. Thank you!

lyndaidaii avatar Apr 14 '22 18:04 lyndaidaii

Is there a workaround or idea when this might make it onto the roadmap/backlog?

mrlacey avatar Jul 03 '23 09:07 mrlacey