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

Tasklist items don't handle nested sublists correctly #168

Closed
NightFlyer opened this issue Jun 24, 2019 · 1 comment · Fixed by #169
Closed

Tasklist items don't handle nested sublists correctly #168

NightFlyer opened this issue Jun 24, 2019 · 1 comment · Fixed by #169

Comments

@NightFlyer
Copy link

There are bugs in the tasklist extension that cause tasklist items to mess up when handling nested sublists. Specifically, if the sublist is indented 4 spaces rather than 2, the list structure is incorrect. So, this code:

- [x] foo
    - [ ] bar
    - [x] baz
- [ ] bim

produces a list structure of:

<ul>
  <li><input type="checkbox" checked="" disabled="" /> foo
        <ul>
           <li><input type="checkbox" disabled="" /> bar
                 <ul>
                     <li><input type="checkbox" checked="" disabled="" /> baz</li>
                 </ul>
          </li>
      </ul>
 </li>
 <li><input type="checkbox" disabled="" /> bim</li>
</ul>

Notice how baz has been made a sublist of bar. However, if you use the following
code (same as before, but replacing the space or x with @ means that it isn't recognized
as a tasklist):

- [@] foo
    - [@] bar
    - [@] baz
- [@] bim

you get the correct list structure of:

<ul>
  <li>[@] foo
    <ul>
      <li>[@] bar</li>
      <li>[@] baz</li>
    </ul>
  </li>
  <li>[@] bim</li>
</ul>
@kivikakk
Copy link

Thank you for this detailed report, and the attendant fix!

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

Successfully merging a pull request may close this issue.

2 participants