showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.26k stars 1.56k forks source link

Parse multiple lines of markdown to html #855

Open jlcreator opened 3 years ago

jlcreator commented 3 years ago

Environment: nodejs, expressjs, EJS, VS Code text editor

I assigned a line of markdown to const text in the quote.

e.g. const text = "- example"

It works.

But when I copy and paste multiple lines of markdown to const code, it wouldn't work.

Impression: It's to do with my markdown not having \n escaping.

Questions:

  1. Am I right with my impression?
  2. If yes to Q.1, how do we solve it by inserting \n for new lines?

Thanks!

tivie commented 2 years ago

Could you elaborate, with a real example? Because showdown can parse blocks of text with newlines.