webpack-contrib / html-loader

HTML Loader
MIT License
1.17k stars 205 forks source link

HTML comments don't show up correctly in the documentation on webpack.js.org #502

Closed sheeit closed 10 months ago

sheeit commented 11 months ago

Documentation Is:

Please Explain in Detail...

As you can see here, in the section entitled "Disable url resolving using the <!-- webpackIgnore: true --> comment" (the first example), the comment doesn't show up at all, and the text is rendered instead as "Disable url resolving using the `` comment".

The same thing happens in the example code.

You can see this here in this screenshot:
screenshot

Your Proposal for Changes

I'm not sure if this would work, but I think escaping the < and > characters in the Markdown file should suffice to fix it on the website (like this: &lt;!-- webpackIgnore: true --&gt;, however, doing this would break it on GitHub because GitHub escapes the HTML in code tags (as you can see here) but that's not happening on the rendered page in the docs site.

Using the HTML <code> tag directly in addition to the escaped angle brackets (<code>&lt;!-- webpackIgnore: true --&gt;</code>) would fix it on both, I think. Here's how it looks on GitHub: <!-- webpackIgnore: true -->

alexander-akait commented 11 months ago

@webpack-bot move to webpack/webpack.js.org