MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.43k stars 1.09k forks source link

Option to display lists like GitHub's markdown, without empty line above #531

Open philfreo opened 8 years ago

philfreo commented 8 years ago

In GitHub you can start a list immediately under a line of text, like:

Problems:
- foo
- bar

and it will show as a bulleted list.

However the same doesn't show up as a list in MacDown unless you add an empty line under Problems:.

Checking 'Render newline literally' doesn't fix this either (you still don't get bulleted list items).

Jmuccigr commented 8 years ago

This is not standard markdown. pandoc, for example, behaves like MacDown does and doesn't create a list without an intervening empty line. I'd vote for leaving it alone.

philfreo commented 8 years ago

Understandable, but it would still be nice to have an option for GitHub flavored. In my world that's where Markdown ends up getting used most, so I was looking for a nice Mac editor to help with that. But it kinda defeats the purpose if you import a big md file from a README or Gist and it doesn't appear correct in Macdown.

relikd commented 4 years ago

All in favor of this idea. Wanted to create an issue for this myself only to notice there is one 4 year old already. I agree with @philfreo that github is the reason no. 1 why I use MacDown.

What standardization are you referring to? The original Markdown format had no proper standardization. Thats why I will refer to the CommonMark standard from now on. For example regarding the OPs initial question, the specs state:

In CommonMark, a list can interrupt a paragraph. That is, no blank line is needed to separate a paragraph from a following list

source: Example 273

There are other issues MacDown isn't currently handling "correctly" in the sense user will see a different result when they upload their file to github (or any other git server for the matter of fact):

- one
- two

- three

Should not produce an empty line as to Example 276.

- one
- 
- three

Should not print "one" as heading but rather insert an empty list item as to Example 285.

You could even use the open source js or c parser references in https://github.com/commonmark/commonmark-spec

Jmuccigr commented 4 years ago

All in favor of this idea. Wanted to create an issue for this myself only to notice there is one 4 year old already. I agree with @philfreo that github is the reason no. 1 why I use MacDown.

What standardization are you referring to? The original Markdown format had no proper standardization. Thats why I will refer to the CommonMark standard from now on.

These are, you realize, fighting words? :-)

There are several markdown "standards" out there. That's part of the problem with supporting it with a renderer. GitHub doesn't use CommonMark either, does it?

porg commented 2 years ago

Very much agree.