macdown icon indicating copy to clipboard operation
macdown copied to clipboard

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

Open philfreo opened this issue 9 years ago • 5 comments

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).

philfreo avatar Jan 08 '16 01:01 philfreo

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.

Jmuccigr avatar Jan 12 '16 16:01 Jmuccigr

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.

philfreo avatar Jan 12 '16 17:01 philfreo

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

relikd avatar Jul 28 '20 15:07 relikd

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?

Jmuccigr avatar Jul 28 '20 16:07 Jmuccigr

Very much agree.

  • Assuming "GitHub flavored" markdown is meanwhile the prominent "dialect"
  • Thought that it's ok to stay true to the real standard, but at least offer an alternative preference. Was disappointed when 'Render newline literally' did not bring the desired workaround.

porg avatar Nov 15 '21 13:11 porg