Skip to content

Tasklists break when loose #557

@not-my-profile

Description

@not-my-profile

For tight lists the output is as expected:

$ printf '* [ ] bar\n* [ ] foo' | cargo run -- --enable-tasklists
<ul>
<li><input disabled="" type="checkbox"/>
bar</li>
<li><input disabled="" type="checkbox"/>
foo</li>
</ul>

For loose lists the checkboxes are however outside of the paragraph tags:

printf '* [ ] bar\n\n* [ ] foo' | cargo run -- --enable-tasklists
<ul>
<li><input disabled="" type="checkbox"/>
<p>bar</p>
</li>
<li><input disabled="" type="checkbox"/>
<p>foo</p>
</li>
</ul>

While the GFM spec unfortunately again lacks a respective test case, I'd argue that it's quite obviously incorrect because the HTML ends up getting rendered as:

image

As opposed to what GitHub is doing:

  • bar

  • foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions