Skip to content

Incorrect parsing of nested lists in markdown #2640

@Jinderamarak

Description

@Jinderamarak

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

The markdown::parse function incorrectly parses nested lists, if there is no empty line before starting nested list.

Here is the problematic markdown content:

**Expected**

- first
- second

    - nested first
    - nested second

- third


**Actual**

- first
- second
    - nested first
    - nested second
- third

Rendered by Github

Expected

  • first

  • second

    • nested first
    • nested second
  • third

Actual

  • first
  • second
    • nested first
    • nested second
  • third

Rendered in Iced

image

What is the expected behavior?

I expected the lists to look like this:
image

I already implemented this fix in my fork here: Jinderamarak@5e7faec

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

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