Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Markdown headers not displayed correctly in npm

Tags:

npm

markdown

Can somebody explain why headers in README.md, displayed correctly in github, are not rendered in npm (they are displayed like "#title")?

example: https://github.com/Cerealkillerway/versionUpdater (ok)

https://www.npmjs.com/package/version-updater (headers wrong)

like image 339
Cereal Killer Avatar asked Sep 28 '22 02:09

Cereal Killer


1 Answers

npm uses markdown-it, which seems to require a space between hashes and text:

#This doesn't work
# This does

I would argue that this is good style, and should be used even if the first version does work. It's much more readable in plain text, which is a big part of Markdown's goal:

Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.

like image 72
Chris Avatar answered Oct 03 '22 05:10

Chris