Why does markdown always format bullets wrong?

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 (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

Synthead,

It’s due to shitty rendering of Markdown. You’re doing it right. File bugs where you see it rendered funny.

CaptObvious,

Joplin, at least, will accept CSS formatting to correct some of this. You can also brute force it with HTML <br> tags.

snowe,
@snowe@programming.dev avatar

Also due to markdown being a very badly defined “spec”.

CaptObvious,

I disagree. It isn’t badly defined, although vanilla Markdown includes some awkward choices. A few have been revised in other versions. But as a markup system that’s also human-readable, it’s a pretty handy tool.

snowe,
@snowe@programming.dev avatar

CommonMark itself even claims that markdown doesn’t have a spec, so not sure you can claim it’s not badly defined. spec.commonmark.org/0.30/-is-a-spec-needed-

asciidoc is much better defined, has hardly any edge cases, supports vastly more features, and is a lot easier to use (the lack of a spec doesn’t ever get in the way)

CaptObvious,

Well, there’s the replacement then.

snowe,
@snowe@programming.dev avatar

CommonMark has been out for almost a decade and still isn’t used ubiquitously, while asciidoc is standard everywhere.

smorks,
@smorks@lemmy.ca avatar

i think if you put less whitespace in between it will format a bit better?

  • A
  • B
    • Sub 1
    • Sub 2
  • C
    • Another Sub 1
    • Another Sub 2
  • D
  • E
otter,

Oh huh

Is there any way to keep some spacing?

Like this


<span style="color:#323232;">- A
</span><span style="color:#323232;">  - sub 1
</span><span style="color:#323232;">  - sub 2
</span><span style="color:#323232;">
</span><span style="color:#323232;">- B
</span><span style="color:#323232;">
</span><span style="color:#323232;">Sentence about C
</span><span style="color:#323232;">  - detail 1C
</span><span style="color:#323232;">  - detail 2C
</span>

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
smorks,
@smorks@lemmy.ca avatar

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.

justlookingfordragon,
@justlookingfordragon@lemmy.world avatar

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

otter,

That will work, thank you!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • nostupidquestions@lemmy.world
  • mdbf
  • magazineikmin
  • everett
  • ethstaker
  • khanakhh
  • InstantRegret
  • Youngstown
  • ngwrru68w68
  • slotface
  • rosin
  • tacticalgear
  • kavyap
  • thenastyranch
  • DreamBathrooms
  • megavids
  • Durango
  • cubers
  • modclub
  • tester
  • cisconetworking
  • GTA5RPClips
  • anitta
  • osvaldo12
  • Leos
  • normalnudes
  • provamag3
  • JUstTest
  • lostlight
  • All magazines