Skip to content
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

Checkbox rendering bug #1534

Closed
doortts opened this issue Aug 14, 2019 · 2 comments · Fixed by #1535
Closed

Checkbox rendering bug #1534

doortts opened this issue Aug 14, 2019 · 2 comments · Fixed by #1535
Labels
category: lists L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue

Comments

@doortts
Copy link

doortts commented Aug 14, 2019

Describe the bug
If newline exists between checkbox list, it looks like doesn't render well

To Reproduce

- Tasks
- [x] Task1
- [ ] Task2

- [ ] Another Task

image

  1. Marked Demo
  2. CommonMark Demo
@UziTech UziTech added the L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue label Aug 14, 2019
@UziTech
Copy link
Member

UziTech commented Aug 14, 2019

task list items is a GFM extension which is why they don't render as checkboxes in the CommonMark Demo

in GFM they render as:


  • Tasks

  • Task1

  • Task2

  • Another Task


When a blank line is in the middle of a list it is considered a loose list so each list item is wrapped in a <p> tag.

It looks like marked doesn't include the checkbox in the <p> tag.

@UziTech
Copy link
Member

UziTech commented Aug 14, 2019

PR #1535 should fix this

demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: lists L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants