From 4a098ddf821e0eb7246760b710bd52d79a9ef1aa Mon Sep 17 00:00:00 2001 From: Tom Yeh Date: Tue, 20 Feb 2024 19:02:38 +0800 Subject: [PATCH] Fix #578: list with checkbox mixed with empty lines --- lib/src/block_syntaxes/list_syntax.dart | 1 + .../extensions/ordered_list_with_checkboxes.unit | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/lib/src/block_syntaxes/list_syntax.dart b/lib/src/block_syntaxes/list_syntax.dart index c911ee70..d8711bb6 100644 --- a/lib/src/block_syntaxes/list_syntax.dart +++ b/lib/src/block_syntaxes/list_syntax.dart @@ -214,6 +214,7 @@ abstract class ListSyntax extends BlockSyntax { indent = precedingWhitespaces + contentWhitespances; } + taskListItemState = null; var content = contentBlockStart != null && !isBlank ? parseTaskListItem(textParser.substring(contentBlockStart)) : ''; diff --git a/test/extensions/ordered_list_with_checkboxes.unit b/test/extensions/ordered_list_with_checkboxes.unit index 3dce7b74..8503e56e 100644 --- a/test/extensions/ordered_list_with_checkboxes.unit +++ b/test/extensions/ordered_list_with_checkboxes.unit @@ -60,4 +60,20 @@
[ ] four
 
+ +>>> checkbox with empty content +1. [ ] one +2. +3. +4. four +5. [ ] five +6. +<<< +
    +
  1. one
  2. +
  3. +
  4. +
  5. four
  6. +
  7. five
  8. +
\ No newline at end of file