Would-You-Bot / website

The official website for the Would You Discord bot. Using Next14 and TailwindCSS
https://wouldyoubot.gg
Other
20 stars 23 forks source link

Fix markdown list #37

Closed mezotv closed 9 months ago

mezotv commented 9 months ago

Currently the markdown lists are broken where they display the actual list icon above the text content looking like sl image-116.png

image-113.png

anniepauline commented 9 months ago

@mezotv how do you want the list to be? Under which component is the list broken?

mezotv commented 9 months ago

@mezotv how do you want the list to be? Under which component is the list broken?

Im not sure which one it is but it shluld display in the same line as the text see Screenshot 1.

Mambinge commented 9 months ago

Interested, anyone working on this? @mezotv

mezotv commented 9 months ago

Interested, anyone working on this? @mezotv

Currently not no.

Mambinge commented 9 months ago

Any idea, where this file is at?

mezotv commented 9 months ago

Any idea, where this file is at?

Probably either here https://github.com/Would-You-Bot/website/blob/main/pages/blog/%5Bslug%5D.tsx or here https://github.com/Would-You-Bot/website/blob/main/pages/blog/index.tsx

gxrsti commented 9 months ago

Out of curiosity, I checked the issue and encountered it only once, right at the beginning. I have been unable to replicate the behaviour since then, which seems weird.

Could you attempt to reproduce this, @mezotv?

mezotv commented 9 months ago

Out of curiosity, I checked the issue and encountered it only once, right at the beginning. I have been unable to replicate the behaviour since then, which seems weird.

Could you attempt to reproduce this, @mezotv?

This happens when there is an empty line between one list item and another like here image

gxrsti commented 9 months ago

Thanks for the information! I've done some investigation, and here's what I found:

Removing the list-style-position: inline from the ul element will render the list correctly.

If you look at the elements, the package wraps our seperated list items in one <ul/> and wraps the content of the list items in a <p/> tag.

image

What's interesting is that non-separated list items won't contain the <p/> tag.

image

I honestly don't see a reason for putting an empty line between two list elements in markdown, but a workaround that fixes this issue is to seperate the items with an empty tag like this:

image

I hope this helps!

Podskio commented 9 months ago

@gxrsti Thank you for the help!