Skip to content

Commit

Permalink
Merge pull request #419 from roife/master
Browse files Browse the repository at this point in the history
Fix #418
  • Loading branch information
yuin committed Oct 8, 2023
2 parents d39ab8f + 04d4dd5 commit 68e5365
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions extension/_test/tasklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,24 @@
<li><input disabled="" type="checkbox"> bim</li>
</ul>
//= = = = = = = = = = = = = = = = = = = = = = = =//



3
//- - - - - - - - -//
- test[x]=[x]
//- - - - - - - - -//
<ul>
<li>test[x]=[x]</li>
</ul>
//= = = = = = = = = = = = = = = = = = = = = = = =//


4
//- - - - - - - - -//
+ [x] [x]
//- - - - - - - - -//
<ul>
<li><input checked="" disabled="" type="checkbox"> [x]</li>
</ul>
//= = = = = = = = = = = = = = = = = = = = = = = =//
3 changes: 3 additions & 0 deletions extension/tasklist.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func (s *taskCheckBoxParser) Parse(parent gast.Node, block text.Reader, pc parse
return nil
}

if parent.HasChildren() {
return nil
}
if _, ok := parent.Parent().(*gast.ListItem); !ok {
return nil
}
Expand Down

0 comments on commit 68e5365

Please sign in to comment.