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

Tasklists with nameless checkboxes move checkbox to next paragraph #882

Open
BenjaminRi opened this issue Apr 28, 2024 · 0 comments
Open

Comments

@BenjaminRi
Copy link

Suppose you have the following markdown code, which contains a nameless checkbox:

* [ ] 
---
bar

So, we run:

printf '* [ ] \n---\nbar' | cargo run -- --enable-tasklists

This results in:

<ul>
<li></li>
</ul>
<hr />
<p><input disabled="" type="checkbox"/>
bar</p>

Which looks like a stray checkbox after the horizontal rule:

markdown_tasklist_stray_checkbox

The checkbox was erroneously added to the next paragraph element.

Additionally, if there is no paragraph following, the checkboxes disappear completely:

printf '* [ ] \n* [ ] \n* [ ] \n' | cargo run -- --enable-tasklists
<ul>
<li></li>
<li></li>
<li></li>
</ul>

It seems to me like this behavior was introduced after #557 was fixed.

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

1 participant