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

Nested (check)lists? #15

Open
2 tasks
daturkel opened this issue Jul 5, 2020 · 4 comments
Open
2 tasks

Nested (check)lists? #15

daturkel opened this issue Jul 5, 2020 · 4 comments

Comments

@daturkel
Copy link

daturkel commented Jul 5, 2020

Hi, thanks for the great extension!

I was wondering if support could be added for nested checklists:

- [x] top
- [x] level
- [ ] items
  - [ ] second level
    - [ ] third level

would become

<ul class="checklist">
<li><input type="checkbox" disabled checked>top</li>
<li><input type="checkbox" disabled checked>level</li>
<li><input type="checkbox" disabled>items
  <ul class="checklist">
    <li><input type="checkbox" disabled>second level
      <ul class="checklist">
        <li><input type="checkbox" disabled>third level</li>
      </ul>
    </li>
  </ul>
</li>
</ul>

It's currently implemented in Github markdown:

  • first level
    • second level

How difficult would something like this be to add? Or maybe it already works and I just am getting the syntax wrong?

Thanks again!

@FND
Copy link
Owner

FND commented Jul 5, 2020

Hey, thanks for your interest.

I'm not currently using this extension myself, but I believe @radude's mdx_truly_sane_lists could solve this issue for you - see details in #7 (comment). Hope that helps.

@daturkel
Copy link
Author

daturkel commented Jul 5, 2020

Thanks for such a quick response! I tried out radude's extension and unfortunately the example in #7 no longer worked. I used git bisect to track down the breaking commit: 41a2418

Unsurprisingly, it was a fairly large change. I think the issue is that the old version managed to work recursively while the current version does not (since it runs the ul rule once and then the li rule once).

I need to think a little more about a good workaround, though maybe you have ideas.

@FND
Copy link
Owner

FND commented Jul 6, 2020

I'm afraid I'm not much help there: I haven't really worked with or on this extension in ages.

@Erik-J-D
Copy link

Erik-J-D commented Oct 2, 2021

I just wrote my own checkbox thing here that works fine with nested lists, I could port it over if you're open to a PR.

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

3 participants