File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -534,10 +534,19 @@ def render_list_item(self, token: SyntaxTreeNode) -> None:
534534 # lists mark them hidden, but we render them regardless).
535535 # Tasklist items by definition start with `[ ]`/`[x]` text
536536 # content, so a paragraph is always the first block child.
537- assert isinstance (item_node .children [0 ], nodes .paragraph )
538- item_node .children [0 ].insert (
539- 0 , nodes .raw ("" , checkbox_html , format = "html" )
540- )
537+ if item_node .children and isinstance (
538+ item_node .children [0 ], nodes .paragraph
539+ ):
540+ item_node .children [0 ].insert (
541+ 0 , nodes .raw ("" , checkbox_html , format = "html" )
542+ )
543+ else :
544+ self .create_warning (
545+ "Tasklist item has no leading paragraph for checkbox" ,
546+ MystWarnings .RENDER_METHOD ,
547+ line = token_line (token , 0 ),
548+ append_to = self .current_node ,
549+ )
541550 else :
542551 self .render_children (token )
543552
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ def create_md_parser(
5050 tasklists_editable = config .enable_checkboxes ,
5151 )
5252 md .use (wordcount_plugin , per_minute = config .words_per_minute )
53- md .options .update ({"linkify" : True , "myst_config" : config })
5453 return md
5554
5655 md = (
You can’t perform that action at this time.
0 commit comments