Skip to content

[Bug] Parsing errors with Mardown lists #86

Closed

Description

@IgnacioHeredia

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:

  1. Big list ✅
* element 1
* element 2
* element 3
* element 4

image

  1. Two small lists, separated by a new line 🔴 --> both lists appear broken!
* element 1
* element 2

* element 3
* element 4

image

  1. Two small lists, separated by text ✅ --> both list are correctly formatted
* element 1
* element 2
Demo:
* element 3
* element 4

image

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

Additional information

No response

Activity

  1. infologie commented on Nov 12, 2023

    @infologie
    Contributor

    Thanks @IgnacioHeredia. This is not a bug but the unintended consequence of a CSS declaration:

    .record main ul,
    .record main ol {
    padding: 0;
    list-style-position: inside;
    }

    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!

  2. infologie commented on Nov 26, 2023

    @infologie
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions