Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.32k stars 308 forks source link

Mixed lists rendered wrong? #502

Closed Braintelligence closed 1 year ago

Braintelligence commented 1 year ago

Describe the bug When using ordered and unordered lists together strange behaviour is being observed. Strange in the sense that markdown parsers seem to interpret it differently.

I'm using easyMDE as a markdown editor and python-markdown2 for actual rendering, which is said to be close to the original markdown spec.

But easyMDE interprets mixed lists different than python-markdown2. See below.

To Reproduce and Screenshots Use the following example content:

1. Test: 
Lorem Ipsum
- Lorem Ipsum
- Lorem Ipsum
- Lorem Ipsum

easyMDE Preview: image

<ol>
<li>Test: 
Lorem Ipsum</li>
</ol>
<ul>
<li>Lorem Ipsum</li>
<li>Lorem Ipsum</li>
<li>Lorem Ipsum</li>
</ul>

python-markdown2 rendering: image

<ol>
<li>Test:<br>
Lorem Ipsum</li>
<li>Lorem Ipsum</li>
<li>Lorem Ipsum</li>
<li>Lorem Ipsum</li>
</ol>

Expected behavior Not sure who is in the wrong here, but I'd expect it to render the same in the easyMDE preview and python-markdown2. If possible I'd want for easyMDE to preview the same behaviour that python-markdown2 is depicting.

If easyMDE is acting correctly I'd be happy if you could provide me to the specification that python-markdown2 is implementing the wrong way here.

Version information

Braintelligence commented 1 year ago

It looks like easyMDE is doing the right thing here, see https://github.com/trentm/python-markdown2/issues/478#issuecomment-1267437938

So I'm closing this again in favor of looking at how python-markdown2 handles this. Thanks!