jbt / markdown-editor

Live (Github-flavored) Markdown Editor
http://jbt.github.com/markdown-editor
ISC License
2.84k stars 645 forks source link

New Line break not showing up #100

Open ventz opened 5 years ago

ventz commented 5 years ago

Hi,

Noticed that new-line breaks are not showing up correctly.

Ex:

1.) Cloud Flare's HTTPS DNS API:
https://developers.cloudflare.com/1.1.1.1/dns-over-https/json-format/

or

2.) Google's HTTPS DNS API:
https://developers.google.com/speed/public-dns/docs/dns-over-https

Under github this shows up as: 1.) Text 2.) Line

Where as under the markdown Editor, it shows up as: 1.) Text Line

cmnguyen01 commented 5 years ago

hi can you give an html that demonstrates the issue? to have some context when testing

aero31aero commented 5 years ago

This issue has some more discussion in #108. The problem is that Github's implementation of GFM claims to ignore the line-break but the actual implementation in the comments doesn't do that:

https://babelmark.github.io/?text=test%0Amarkdown

aero31aero commented 5 years ago

I'm tempted to close this as WONTFIX because github's rendering and our rendering is the same in case of .md files in a repository (screenshot while editing README.md of this project):

image

We should aim to be consistent with how github treats the markdown files instead of how they treat comments on issues/PRs.