SublimeText-Markdown / MarkdownEditing

Powerful Markdown package for Sublime Text with better syntax understanding and good color schemes.
MIT License
3.19k stars 649 forks source link

Inserting line break in lists messes up the syntax #669

Closed stevenxxiu closed 2 years ago

stevenxxiu commented 2 years ago

The following is Markdown which produces a line break in the middle of the list. The syntax highlighting fails however, as the 3 isn't highlighted as italics.

- 1
    - 2  
    <br/>
    - *3*
deathaxe commented 2 years ago

According to CommonMark (see: https://spec.commonmark.org/0.30/#html-blocks) <br/> starts a type 7 html block, which requires an empty line to be terminated.

As the following example shows, Github doesn't render the *3* italic.

Gitlab's Markdown renderer behaves the same way:

grafik

Hence I'd call this working as expected.

stevenxxiu commented 2 years ago

Hmm ok I guess this and https://github.com/Python-Markdown/markdown that https://facelessuser.github.io/MarkdownPreview/ uses, appear to display the items differently.

Not much I can do now except to just use --- and style that.