Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Cosma are you using?
CLI 2.0.0
On which operating system(s) did you observe the bug?
- macOS
- Windows
- Linux
What version of the operating system are you on?
Ubuntu 20.04
Actions leading to the bug
Described below.
Bug description
I think there is something wrong with how markdown lists are parsed. Let me explain with three different examples:
- Big list ✅
* element 1
* element 2
* element 3
* element 4
- Two small lists, separated by a new line 🔴 --> both lists appear broken!
* element 1
* element 2
* element 3
* element 4
- Two small lists, separated by text ✅ --> both list are correctly formatted
* element 1
* element 2
Demo:
* element 3
* element 4
Now, regarding example 3), while lists are correctly formatted, I not sure the formatting is entirely correct either, because the intermediate text shouldn't be a completely newline, it should be indented as to belong to the previous bullet point. It seems that Cosma doesn't properly parse multilines in bullet lists.
Let me show with an example:
* element 1
more info about element 1
* element 2 \
more info about element 2
* element 3
Github: Text is properly indented.
- element 1
more info about element 1 - element 2
more info about element 2 - element 3
Cosma:
None of the options work, text is never indented so as to belong to the previous bulletpoint. It's just treated as text separating different lists, not as a single list.

Additional information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working



Activity
infologie commentedon Nov 12, 2023
Thanks @IgnacioHeredia. This is not a bug but the unintended consequence of a CSS declaration:
cosma/core/static/styles/styles.css
Lines 532 to 536 in 260ee52
This makes it so that lists are flush with the margin, with the bullet "inside" the paragraph instead of "outside" on the left.
I don't know why this is the way it is… I rarely use lists, so I never noticed this until you pointed it out.
I'm happy to modify our CSS so that lists are typeset more conventionally. It's an easy fix, so it will be in the next update.
Edit: well, actually it is a bug, since it prevents multiline bulleted lists from being rendered properly. Anyway, an easy bug to squash!
edit: record list styles (issue #86)
infologie commentedon Nov 26, 2023
@IgnacioHeredia Fixed in v2.3.0.