I use markdown-it like so
const markdown = require("markdown-it")("default", {
html: true,
linkify: true,
typographer: true
});
const htmlText = markdown.render(textFileContent);
and it works fine with until I do
#Big title
##Title
#Small title
which get wrapped into <p> instead of <h1> <h2> . Note this works with Github. etc
but this works
Big title
---------
Title
=======
I cannot change the markdown. User expect it to be parsed like it does in GitHub and stackoverflow.