npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Which markdown renderer does use?

I find markdown issue in my packages or others’ packages from time to time. Sometimes it could be the author’s mistake in markdown syntax, while other times, it could be caused by the difference in markdown renderers, i.e. I may have a markdown that renders normally on GitHub but having issue rendering on npm website, and sometimes the other way around.

However, one key difference between fixing markdown issue on GitHub and markdown issue on npm is that, while I can verify my markdown on a branch on GitHub, I cannot do the same without publishing it to npm registry. And because once the version is published it cannot be reverted (not fully, the same version number cannot be used again), it is hardly a reliable way to verify whether I have fixed my markdown or not.

So I wonder if documentation can be added specifying the markdown renderer npm website uses (if it is some open-source project) so that we can use the same tool to preview the change before publishing. Or alternatively, could you please provide a rendering test page so that we don’t have to publish the entire package to get the markdown rendered?

Good question. A way of testing without publishing would be handy. (On a related note, I use a markdown linter to increase the chance I am using standard compatible markdown, and this reduces the number of issues I have had.)

The markdown renderer used is marky-markdown

Hi all, thanks so much for this feedback. That’s definitely something we could add to this article: I’ve also used marky-markdown to test readme files in the browser when I’m investigating bugs. Sometimes, those errors can be a result of a bug on our end, but it can also be a rendering issue.