Skip to content

Bug with empty list item #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
akishind-medlinx opened this issue Oct 10, 2022 · 1 comment
Closed

Bug with empty list item #96

akishind-medlinx opened this issue Oct 10, 2022 · 1 comment

Comments

@akishind-medlinx
Copy link

Hello! There seems to be a visual bug when there is en empty item in the list, for the text after the list. For example

MaterialRichText(style = null) {
    Markdown(
        content = "List\n* item1\n* \n* item2\n\nSome text",
        onLinkClicked = null
    )
}

produces this result:
image

This is the expected result (I added a non-breaking space for the empty item):
image

Can you tell me, is it caused by a bug in the library? Or is this a problem with the Markdown itself, and its specification?

@atulgpt
Copy link
Contributor

atulgpt commented Jan 16, 2024

Screenshot 2024-01-16 at 4 27 59 PM

Rendering this in https://spec.commonmark.org/dingus/ produces the correct result this seems like the bug in this library code

halilozercan added a commit that referenced this issue Feb 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…-item

Fix #96
vivganes pushed a commit to vivganes/compose-richtext that referenced this issue Aug 6, 2024
When rendering markdown lists, some list items may return empty an empty child set. This can be due to markdown content like the following

```
* hello
*
* world
```

In this case, markdown renderer should just put an empty Text in the second item so that `PrefixListLayout` has something to place and report its size correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants