Tasklist items wrapped in paragraph tag

Hi Hi,

I’m having an issue when I use the markdown to generate takslists. The content for the tasklist item is sometimes getting wrapped in an extra paragraph tag, which places the tasklist checkbox on a separate (empty) line from the tasklist content. Not ideal.

I’ve narrowed it down to a small set of changes that goes from rendering correctly to broken rendering for me (see below). Surprisingly, a blank line is all it takes to cause this rendering artifact/breakage.

The following renders correctly:

+++
title = "todo list"
date = "2021-12-30"
+++

  - [x] first list item
    - second list item

    - third list item 
    - fourth list item
  - [x] fifth list item 

The following DOES NOT render correctly:

+++
title = "todo list"
date = "2021-12-30"
+++

  - [x] first list item
    - second list item

    - third list item 
    - fourth list item

  - [x] fifth list item 

The only difference here is the blank line between the fourth list item and the fifth list item…

I know the old adage: don’t do that… but I’m really hoping for a fix so I don’t have to debug the whitespace in my tasklists…

I’m on Zola version 0.15.3, and I’m running the prebuild executable on windows 10.

Thanks for any suggestions/ideas.

That sounds like either the spec for the tasklist option or an issue in GitHub - raphlinus/pulldown-cmark the parser we use.

Zola doesn’t do any processing of task list items so it’s unlikely to be an issue directly in Zola

Thanks for the background info @Keats,
I’ll chase this issue upstream (with pulldown-cmark).