Why does markdown always format bullets wrong?

Otter@lemmy.ca to No Stupid Questions@lemmy.world – 36 points –

I've noticed this on a lot of places that use Markdown. The bullet points have more space above than they do below. This makes it confusing visually because it looks like the text is associated with the item below, even though logically it should be related to the item above.

You can see this happening on my lemmy post here (https://lemmy.ca/post/11285664), but it also happens in other markdown based apps like Joplin

So why was it designed like that? Is it meant to convey something, or is there a way that we are supposed to use Markdown to prevent that?

As a quick example, see here:

  • List item A

  • List item B

    • List item B.1
    • List item B.2
  • List item C

12

You are viewing a single comment

Oh huh

Is there any way to keep some spacing?

Like this

- A
  - sub 1
  - sub 2

- B

Sentence about C
  - detail 1C
  - detail 2C

Similar issues come up if I have sentences with bullet points:


Here is some information

  • detail 1
  • detail 2

Here is the next bit of information

  • detail 1
  • detail 2

it doesn't appear to be easy to do either of those, from some quick testing. Looks like the <p></p> tags have bottom spacing which is causing the issue, mainly, at least in lemmy's case. weird.

Is there any way to keep some spacing?

&nbsp; will add an empty row, if that's whats you meant. That's what I currently use.

So in your example:


Here is some information

  • detail 1
  • detail 2  

&nbsp;  

Here is the next bit of information


... will turn into:

Here is some information

  • detail 1
  • detail 2

 

Here is the next bit of information

That will work, thank you!

1 more...