Repository: jackdewinter/pymarkdown

Issue:
MD012: Add Fix
Requires token changes in fix engine.
Suggested for tier 2 fixes.
need to consider other blanks and how they will compete.

Discussion:
sourcery-ai[bot]: <!-- Generated by sourcery-ai[bot]: start review_guide -->

🧙 Sourcery is reviewing your pull request!

---

<details>
<summary>Tips and commands</summary>

#### Interacting with Sourcery

- **Trigger a new review:** Comment `@sourcery-ai review` on the pull request.
- **Continue discussions:** Reply directly to Sourcery's review comments.
- **Generate a GitHub issue from a review comment:** Ask Sourcery to create an
  issue from a review comment by replying to it.
- **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull
  request title to generate a title at any time.
- **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in
  the pull request body to generate a PR summary at any time. You can also use
  this command to specify where the summary should be inserted.

#### Customizing Your Experience

Access your [dashboard](https://app.sourcery.ai) to:
- Enable or disable review features such as the Sourcery-generated pull request
  summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.

#### Getting Help

- [Contact our support team](mailto:support@sourcery.ai) for questions or feedback.
- Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information.
- Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).

</details>

<!-- Generated by sourcery-ai[bot]: end review_guide -->
codecov[bot]: ## [Codecov](https://app.codecov.io/gh/jackdewinter/pymarkdown/pull/1260?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 100.00%. Comparing base [(`ab8a5de`)](https://app.codecov.io/gh/jackdewinter/pymarkdown/commit/ab8a5de88c46bfec8022d1d1649fbd51a25ec976?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) to head [(`a8179a7`)](https://app.codecov.io/gh/jackdewinter/pymarkdown/commit/a8179a720007d3f6df33dabaf94e00af71c13391?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).

<details><summary>Additional details and impacted files</summary>


```diff
@@             Coverage Diff             @@
##             main     #1260      +/-   ##
===========================================
+ Coverage   99.98%   100.00%   +0.01%     
===========================================
  Files         191       191              
  Lines       21197     21304     +107     
  Branches     2716      2731      +15     
===========================================
+ Hits        21193     21304     +111     
+ Misses          1         0       -1     
+ Partials        3         0       -3     
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/jackdewinter/pymarkdown/pull/1260?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).


Patch:
diff --git a/newdocs/src/changelog.md b/newdocs/src/changelog.md
index 2447ecb7..734228f8 100644
--- a/newdocs/src/changelog.md
+++ b/newdocs/src/changelog.md
@@ -5,12 +5,15 @@
 <!--- pyml disable-next-line no-duplicate-heading-->
 ### Added
 
-None
+- [Issue 810](https://github.com/jackdewinter/pymarkdown/issues/810)
+    - Added fix for Rule Md012
 
 <!--- pyml disable-next-line no-duplicate-heading-->
 ### Fixed
 
-None
+- [Issue 1259](https://github.com/jackdewinter/pymarkdown/issues/1259)
+    - Fixed asserts and bad parsing from cases where containers are
+      added and then a "raw" blank line removes all containers
 
 <!--- pyml disable-next-line no-duplicate-heading-->
 ### Changed
diff --git a/publish/coverage.json b/publish/coverage.json
index aa8022ae..3caf6b5c 100644
--- a/publish/coverage.json
+++ b/publish/coverage.json
@@ -2,12 +2,12 @@
     "projectName": "pymarkdown",
     "reportSource": "pytest",
     "branchLevel": {
-        "totalMeasured": 5433,
-        "totalCovered": 5430
+        "totalMeasured": 5463,
+        "totalCovered": 5463
     },
     "lineLevel": {
-        "totalMeasured": 21197,
-        "totalCovered": 21196
+        "totalMeasured": 21304,
+        "totalCovered": 21304
     }
 }
 
diff --git a/pymarkdown/extensions/pragma_token.py b/pymarkdown/extensions/pragma_token.py
index 908b6fce..ff0a37c0 100644
--- a/pymarkdown/extensions/pragma_token.py
+++ b/pymarkdown/extensions/pragma_token.py
@@ -361,18 +361,24 @@ class PragmaToken(MarkdownToken):
     def __init__(self, pragma_lines: Dict[int, str]) -> None:
         self.__pragma_lines = pragma_lines
 
-        serialized_pragmas = "".join(
-            f";{next_line_number}:{pragma_lines[next_line_number]}"
-            for next_line_number in pragma_lines
-        )
-
         MarkdownToken.__init__(
             self,
             MarkdownToken._token_pragma,
             MarkdownTokenClass.SPECIAL,
             is_extension=True,
-            extra_data=serialized_pragmas[1:],
+            extra_data="",
+        )
+        self.__compose_extra_data_field()
+
+    def __compose_extra_data_field(self) -> None:
+        """
+        Compose the object's self.extra_data field from the local object's variables.
+        """
+        serialized_pragmas = "".join(
+            f";{next_line_number}:{self.__pragma_lines[next_line_number]}"
+            for next_line_number in self.__pragma_lines
         )
+        self._set_extra_data(serialized_pragmas[1:])
 
     @staticmethod
     def get_markdown_token_type() -> str:
@@ -388,6 +394,15 @@ class PragmaToken(MarkdownToken):
         """
         return self.__pragma_lines
 
+    def adjust_pragma_line_number(
+        self, initial_line_number: int, new_line_number: int
+    ) -> None:
+        """Perform an adjustment to the line number of a given pragma."""
+        old_pragma = self.__pragma_lines[initial_line_number]
+        del self.__pragma_lines[initial_line_number]
+        self.__pragma_lines[new_line_number] = old_pragma
+        self.__compose_extra_data_field()
+
     def register_for_markdown_transform(
         self,
         registration_function: RegisterMarkdownTransformHandlersProtocol,
diff --git a/pymarkdown/file_scan_helper.py b/pymarkdown/file_scan_helper.py
index 7f945069..b1ca6e2d 100644
--- a/pymarkdown/file_scan_helper.py
+++ b/pymarkdown/file_scan_helper.py
@@ -683,15 +683,31 @@ class FileScanHelper:
             and actual_tokens[actual_start_index].is_end_token
         ):
             actual_start_index += 1
-        index_delta = end_index - actual_start_index + 1
+        line_number_delta_1 = (
+            next_replacement.end_token.line_number
+            - actual_tokens[actual_start_index].line_number
+        ) + 1
+        line_number_delta_2 = (
+            next_replacement.replacement_tokens[-1].line_number
+            - next_replacement.replacement_tokens[0].line_number
+        ) + 1
+        line_number_delta = line_number_delta_2 - line_number_delta_1
 
         new_tokens = actual_tokens[:start_index]
         new_tokens.extend(next_replacement.replacement_tokens)
         end_tokens = actual_tokens[end_index + 1 :]
         for next_token in end_tokens:
-            next_token.adjust_line_number(context, index_delta)
+            next_token.adjust_line_number(context, line_number_delta)
         new_tokens.extend(end_tokens)
 
+        if new_tokens[-1].is_pragma:
+            pragma_token = cast(PragmaToken, new_tokens[-1])
+            for pragma_line_number in sorted(pragma_token.pragma_lines.keys())[::-1]:
+                if pragma_line_number > next_replacement.end_token.line_number:
+                    pragma_token.adjust_pragma_line_number(
+                        pragma_line_number, pragma_line_number + line_number_delta
+                    )
+
         actual_tokens.clear()
         actual_tokens.extend(new_tokens)
 
diff --git a/pymarkdown/general/tokenized_markdown.py b/pymarkdown/general/tokenized_markdown.py
index 5320560e..3230e0b2 100644
--- a/pymarkdown/general/tokenized_markdown.py
+++ b/pymarkdown/general/tokenized_markdown.py
@@ -837,6 +837,9 @@ class TokenizedMarkdown:
             TokenizedMarkdown.__handle_blank_line_in_block_quote(
                 parser_state, new_tokens
             )
+            new_tokens = TokenizedMarkdown.__handle_blank_line_close_first_quote(
+                parser_state, new_tokens
+            )
 
         if force_default_handling or new_tokens is None:
             POGGER.debug("hbl>>default blank handling-->cob")
@@ -895,7 +898,7 @@ class TokenizedMarkdown:
                 next_index
             ].matching_markdown_token
             assert found_markdown_token is not None
-            block_copy_token = next(
+            block_copy_token = next(  # pragma: no cover
                 (
                     j
                     for j in parser_state.block_copy
@@ -907,23 +910,24 @@ class TokenizedMarkdown:
                 ),
                 None,
             )
-            if block_copy_token is not None:
-                assert found_markdown_token.is_list_start
-                found_markdown_list_token = cast(
-                    ListStartMarkdownToken, found_markdown_token
-                )
-                found_markdown_token_leading_spaces = (
-                    found_markdown_list_token.leading_spaces
-                )
-                assert block_copy_token.is_list_start
-                block_copy_list_token = cast(ListStartMarkdownToken, block_copy_token)
-                block_copy_token_leading_spaces = block_copy_list_token.leading_spaces
-                are_same = (
-                    found_markdown_token_leading_spaces
-                    == block_copy_token_leading_spaces
-                )
-                assert not are_same
-                found_markdown_list_token.remove_last_leading_space()
+
+            # assert on next line was if statement with rest of function in if block
+            assert block_copy_token is not None
+            assert found_markdown_token.is_list_start
+            found_markdown_list_token = cast(
+                ListStartMarkdownToken, found_markdown_token
+            )
+            found_markdown_token_leading_spaces = (
+                found_markdown_list_token.leading_spaces
+            )
+            assert block_copy_token.is_list_start
+            block_copy_list_token = cast(ListStartMarkdownToken, block_copy_token)
+            block_copy_token_leading_spaces = block_copy_list_token.leading_spaces
+            are_same = (
+                found_markdown_token_leading_spaces == block_copy_token_leading_spaces
+            )
+            assert not are_same
+            found_markdown_list_token.remove_last_leading_space()
 
     @staticmethod
     def __handle_blank_line_token_stack(
@@ -985,11 +989,44 @@ class TokenizedMarkdown:
             POGGER.debug("hbl<<double blank in list")
         return new_tokens, force_default_handling, requeue_line_info
 
+    @staticmethod
+    def __handle_blank_line_close_first_quote(
+        parser_state: ParserState, new_tokens: Optional[List[MarkdownToken]]
+    ) -> Optional[List[MarkdownToken]]:
+
+        stack_index = 1
+        while (
+            stack_index < len(parser_state.token_stack)
+            and not parser_state.token_stack[stack_index].is_block_quote
+        ):
+            stack_index += 1
+
+        close_tokens, _ = parser_state.close_open_blocks_fn(
+            parser_state,
+            include_block_quotes=True,
+            include_lists=True,
+            until_this_index=stack_index,
+            was_forced=True,
+        )
+        POGGER.debug("close_tokens>>$", close_tokens)
+        if new_tokens is not None:
+            new_tokens.extend(close_tokens)
+        elif close_tokens:
+            new_tokens = close_tokens
+        return new_tokens
+
     @staticmethod
     def __handle_blank_line_in_block_quote(
         parser_state: ParserState, new_tokens: Optional[List[MarkdownToken]]
     ) -> None:
+        assert new_tokens is None or len(new_tokens) <= 1
+        if new_tokens:
+            assert len(new_tokens) == 1
+            if new_tokens[0].is_list_end:
+                return
         stack_index = parser_state.find_last_container_on_stack()
+        if parser_state.token_stack[stack_index].is_list:
+            return
         POGGER.debug_with_visible_whitespace("new_tokens>>$", new_tokens)
         POGGER.debug("stack_index>>$", stack_index)
         if new_tokens and stack_index > 0:
diff --git a/pymarkdown/leaf_blocks/leaf_block_processor_paragraph.py b/pymarkdown/leaf_blocks/leaf_block_processor_paragraph.py
index 6abf48a6..96320a38 100644
--- a/pymarkdown/leaf_blocks/leaf_block_processor_paragraph.py
+++ b/pymarkdown/leaf_blocks/leaf_block_processor_paragraph.py
@@ -13,7 +13,7 @@ from pymarkdown.general.parser_state import ParserState
 from pymarkdown.general.position_marker import PositionMarker
 from pymarkdown.general.tab_helper import TabHelper
 from pymarkdown.tokens.blank_line_markdown_token import BlankLineMarkdownToken
-from pymarkdown.tokens.markdown_token import EndMarkdownToken, MarkdownToken
+from pymarkdown.tokens.markdown_token import MarkdownToken
 from pymarkdown.tokens.paragraph_markdown_token import ParagraphMarkdownToken
 from pymarkdown.tokens.stack_token import (
     BlockQuoteStackToken,
@@ -354,37 +354,38 @@ class LeafBlockProcessorParagraph:
             only_these_blocks=[BlockQuoteStackToken],
             include_block_quotes=True,
         )
-        if new_tokens:
-            assert parser_state.token_stack[-1].is_list, "Must be within list block."
-            search_index = len(parser_state.token_stack)
-            leading_space_length = (
-                len(extracted_whitespace) + position_marker.index_indent
-            )
-            did_once = False
-            while parser_state.token_stack[search_index - 1].is_list:
-                list_token = cast(
-                    ListStackToken, parser_state.token_stack[search_index - 1]
-                )
-                if list_token.indent_level <= leading_space_length:
-                    break
-                search_index -= 1
-                did_once = True
-            if did_once:
-                # POGGER.debug("lsl $", parser_state.token_stack[search_index])
-                end_token = cast(EndMarkdownToken, new_tokens[-1])
-                end_token.set_extra_end_data(None)
-
-                (
-                    container_level_tokens,
-                    _,
-                ) = parser_state.close_open_blocks_fn(
-                    parser_state,
-                    until_this_index=search_index,
-                    include_lists=True,
-                    caller_can_handle_requeue=False,
-                    requeue_reset=True,
-                )
-                new_tokens.extend(container_level_tokens)
+        _ = (position_marker, extracted_whitespace)
+        # if new_tokens:
+        # assert parser_state.token_stack[-1].is_list, "Must be within list block."
+        # search_index = len(parser_state.token_stack)
+        # leading_space_length = (
+        #     len(extracted_whitespace) + position_marker.index_indent
+        # )
+        # did_once = False
+        # while parser_state.token_stack[search_index - 1].is_list:
+        #     list_token = cast(
+        #         ListStackToken, parser_state.token_stack[search_index - 1]
+        #     )
+        #     if list_token.indent_level <= leading_space_length:
+        #         break
+        #     search_index -= 1
+        #     did_once = True
+        # if did_once:
+        #     # POGGER.debug("lsl $", parser_state.token_stack[search_index])
+        #     end_token = cast(EndMarkdownToken, new_tokens[-1])
+        #     end_token.set_extra_end_data(None)
+
+        #     (
+        #         container_level_tokens,
+        #         _,
+        #     ) = parser_state.close_open_blocks_fn(
+        #         parser_state,
+        #         until_this_index=search_index,
+        #         include_lists=True,
+        #         caller_can_handle_requeue=False,
+        #         requeue_reset=True,
+        #     )
+        #     new_tokens.extend(container_level_tokens)
         return new_tokens
 
     @staticmethod
diff --git a/pymarkdown/plugins/rule_md_012.py b/pymarkdown/plugins/rule_md_012.py
index 2dae700d..f6c558b9 100644
--- a/pymarkdown/plugins/rule_md_012.py
+++ b/pymarkdown/plugins/rule_md_012.py
@@ -2,7 +2,8 @@
 Module to implement a plugin that looks for multiple blank lines in the files.
 """
 
-from typing import List, Optional
+from dataclasses import dataclass
+from typing import Dict, List, Optional, cast
 
 from pymarkdown.plugin_manager.plugin_details import (
     PluginDetails,
@@ -11,7 +12,20 @@ from pymarkdown.plugin_manager.plugin_details import (
 )
 from pymarkdown.plugin_manager.plugin_scan_context import PluginScanContext
 from pymarkdown.plugin_manager.rule_plugin import RulePlugin
-from pymarkdown.tokens.markdown_token import MarkdownToken
+from pymarkdown.plugins.utils.leading_space_index_tracker import (
+    LeadingSpaceIndexTracker,
+)
+from pymarkdown.tokens.block_quote_markdown_token import BlockQuoteMarkdownToken
+from pymarkdown.tokens.list_start_markdown_token import ListStartMarkdownToken
+from pymarkdown.tokens.markdown_token import EndMarkdownToken, MarkdownToken
+
+
+@dataclass
+class PendingContainerFixes:
+    """Class to hold the pending fixes to be made when the container is closed."""
+
+    leading_space_index: int
+    repeat_count: int
 
 
 class RuleMd012(RulePlugin):
@@ -24,6 +38,9 @@ class RuleMd012(RulePlugin):
         self.__blank_lines_maximum = 0
         self.__blank_line_count = 0
         self.__last_blank_line: Optional[MarkdownToken] = None
+        self.__captured_blank_line: List[MarkdownToken] = []
+        self.__leading_space_index_tracker = LeadingSpaceIndexTracker()
+        self.__container_fix_map: Dict[MarkdownToken, List[PendingContainerFixes]] = {}
 
     def get_details(self) -> PluginDetails:
         """
@@ -34,9 +51,11 @@ class RuleMd012(RulePlugin):
             plugin_id="MD012",
             plugin_enabled_by_default=True,
             plugin_description="Multiple consecutive blank lines",
-            plugin_version="0.6.0",
+            plugin_version="0.7.0",
             plugin_url="https://pymarkdown.readthedocs.io/en/latest/plugins/rule_md012.md",
             plugin_configuration="maximum",
+            plugin_supports_fix=True,
+            plugin_fix_level=1,
         )
 
     @classmethod
@@ -66,14 +85,154 @@ class RuleMd012(RulePlugin):
         """
         self.__blank_line_count = 0
         self.__last_blank_line = None
+        self.__captured_blank_line.clear()
+        self.__leading_space_index_tracker.clear()
+        self.__container_fix_map.clear()
+
+    def __append_to_container_fix_map(
+        self, key: MarkdownToken, value: PendingContainerFixes
+    ) -> None:
+        if key in self.__container_fix_map:
+            value_list = self.__container_fix_map[key]
+        else:
+            value_list = []
+            self.__container_fix_map[key] = value_list
+        value_list.append(value)
+
+    def __fix_containers(self) -> None:
+        outer_container_index = (
+            self.__leading_space_index_tracker.get_container_stack_size() - 1
+        )
+        container_token = self.__leading_space_index_tracker.get_container_stack_item(
+            outer_container_index
+        )
+        line_number_delta = (
+            self.__captured_blank_line[-1].line_number
+            - self.__captured_blank_line[0].line_number
+        )
+        if container_token.is_block_quote_start:
+            leading_space_index = self.__leading_space_index_tracker.get_tokens_block_quote_bleading_space_index(
+                self.__captured_blank_line[-1]
+            )
+            self.__append_to_container_fix_map(
+                container_token,
+                PendingContainerFixes(
+                    leading_space_index - (line_number_delta - 1), line_number_delta
+                ),
+            )
+            inner_container_index = outer_container_index - 1
+            while (
+                inner_container_index >= 0
+                and self.__leading_space_index_tracker.get_container_stack_item(
+                    inner_container_index
+                ).is_block_quote_start
+            ):
+                inner_container_index -= 1
+            if inner_container_index >= 0:
+                leading_space_index = self.__leading_space_index_tracker.get_tokens_list_leading_space_index(
+                    self.__captured_blank_line[-1], inner_container_index
+                )
+                container_token = (
+                    self.__leading_space_index_tracker.get_container_stack_item(
+                        inner_container_index
+                    )
+                )
+                self.__append_to_container_fix_map(
+                    container_token,
+                    PendingContainerFixes(
+                        leading_space_index - (line_number_delta - 1), line_number_delta
+                    ),
+                )
+        else:
+            leading_space_index = (
+                self.__leading_space_index_tracker.get_tokens_list_leading_space_index(
+                    self.__captured_blank_line[-1], outer_container_index
+                )
+            )
+            self.__append_to_container_fix_map(
+                container_token,
+                PendingContainerFixes(
+                    leading_space_index - (line_number_delta - 1), line_number_delta
+                ),
+            )
+            inner_container_index = outer_container_index - 1
+            while (
+                inner_container_index >= 0
+                and self.__leading_space_index_tracker.get_container_stack_item(
+                    inner_container_index
+                ).is_list_start
+            ):
+                inner_container_index -= 1
+            if inner_container_index >= 0:
+                leading_space_index = self.__leading_space_index_tracker.get_tokens_block_quote_bleading_space_index(
+                    self.__captured_blank_line[-1], inner_container_index
+                )
+                container_token = (
+                    self.__leading_space_index_tracker.get_container_stack_item(
+                        inner_container_index
+                    )
+                )
+                self.__append_to_container_fix_map(
+                    container_token,
+                    PendingContainerFixes(
+                        leading_space_index - (line_number_delta - 1), line_number_delta
+                    ),
+                )
 
     def __check_for_excess_blank_lines(self, context: PluginScanContext) -> None:
         if self.__blank_line_count > self.__blank_lines_maximum:
-            extra_data = f"Expected: {self.__blank_lines_maximum}, Actual: {self.__blank_line_count}"
+            if context.in_fix_mode:
+                if self.__leading_space_index_tracker.in_at_least_one_container():
+                    self.__fix_containers()
+
+                replacement_tokens = self.__captured_blank_line[:1]
+                self.register_replace_tokens_request(
+                    context,
+                    self.__captured_blank_line[0],
+                    self.__captured_blank_line[-1],
+                    replacement_tokens,
+                )
+            else:
+                assert self.__last_blank_line is not None
+                extra_data = f"Expected: {self.__blank_lines_maximum}, Actual: {self.__blank_line_count}"
+                self.report_next_token_error(
+                    context, self.__last_blank_line, extra_error_information=extra_data
+                )
+        self.__captured_blank_line.clear()
 
-            assert self.__last_blank_line is not None
-            self.report_next_token_error(
-                context, self.__last_blank_line, extra_error_information=extra_data
+    def __process_pending_container_end_fixes(
+        self, context: PluginScanContext, token: MarkdownToken
+    ) -> None:
+        end_token = cast(EndMarkdownToken, token)
+        if end_token.start_markdown_token in self.__container_fix_map:
+            value_list = self.__container_fix_map[end_token.start_markdown_token]
+            if end_token.start_markdown_token.is_block_quote_start:
+                block_token = cast(
+                    BlockQuoteMarkdownToken, end_token.start_markdown_token
+                )
+                assert block_token.bleading_spaces is not None
+                split_spaces = block_token.bleading_spaces.split("\n")
+                token_part_name = "bleading_spaces"
+            else:
+                list_token = cast(
+                    ListStartMarkdownToken, end_token.start_markdown_token
+                )
+                assert list_token.leading_spaces is not None
+                split_spaces = list_token.leading_spaces.split("\n")
+                token_part_name = "leading_spaces"
+
+            while value_list:
+                pending_container_fixes: PendingContainerFixes = value_list[-1]
+                for _ in range(pending_container_fixes.repeat_count):
+                    del split_spaces[pending_container_fixes.leading_space_index]
+                del value_list[-1]
+
+            self.register_fix_token_request(
+                context,
+                end_token.start_markdown_token,
+                "next_token",
+                token_part_name,
+                "\n".join(split_spaces),
             )
 
     def completed_file(self, context: PluginScanContext) -> None:
@@ -93,8 +252,19 @@ class RuleMd012(RulePlugin):
             ):
                 self.__check_for_excess_blank_lines(context)
                 self.__blank_line_count = 0
+            self.__captured_blank_line.append(token)
             self.__last_blank_line = token
             self.__blank_line_count += 1
         else:
-            self.__check_for_excess_blank_lines(context)
+            if self.__blank_line_count:
+                self.__check_for_excess_blank_lines(context)
             self.__blank_line_count = 0
+
+        if token.is_block_quote_end or token.is_list_end:
+            self.__process_pending_container_end_fixes(context, token)
+
+        if token.is_block_quote_start or token.is_list_start:
+            self.__leading_space_index_tracker.open_container(token)
+        elif token.is_block_quote_end or token.is_list_end:
+            self.__leading_space_index_tracker.register_container_end(token)
+        self.__leading_space_index_tracker.track_since_last_non_end_token(token)
diff --git a/pymarkdown/plugins/rule_md_031.py b/pymarkdown/plugins/rule_md_031.py
index 715cf2ef..6c3f1e72 100644
--- a/pymarkdown/plugins/rule_md_031.py
+++ b/pymarkdown/plugins/rule_md_031.py
@@ -626,15 +626,18 @@ class RuleMd031(RulePlugin):
             #         found_block_quote_token = token_at_index
             #         break
             #     last_stack_token_index -= 1
-            if (
+
+            # assert was if
+            assert (
                 found_block_quote_token
                 and len(self.__x1) == 2
                 and self.__x1[0].is_list_start
                 and self.__x1[1].is_block_quote_start
-            ):
-                did_process_removals = upgrade_kludge = (
-                    self.__apply_tailing_block_quote_fix(1, context)
-                )
+            )
+            did_process_removals = upgrade_kludge = (
+                self.__apply_tailing_block_quote_fix(1, context)
+            )
+            # endif
         return did_process_removals, upgrade_kludge
 
     def __apply_tailing_block_quote_fix(
diff --git a/pymarkdown/plugins/rule_md_032.py b/pymarkdown/plugins/rule_md_032.py
index 65bd6a08..277ac258 100644
--- a/pymarkdown/plugins/rule_md_032.py
+++ b/pymarkdown/plugins/rule_md_032.py
@@ -74,6 +74,7 @@ class RuleMd032(RulePlugin):
                 not token.is_blank_line
                 and not token.is_new_list_item
                 and not token.is_list_end
+                and not token.is_block_quote_end
                 and not token.is_end_of_stream
             ):
                 self.report_next_token_error(context, token, line_number_delta=-1)
diff --git a/pymarkdown/plugins/utils/leading_space_index_tracker.py b/pymarkdown/plugins/utils/leading_space_index_tracker.py
index d294f48e..012b0d77 100644
--- a/pymarkdown/plugins/utils/leading_space_index_tracker.py
+++ b/pymarkdown/plugins/utils/leading_space_index_tracker.py
@@ -173,11 +173,17 @@ class LeadingSpaceIndexTracker:
                 ].adjustment += line_number_delta
                 break
 
-    def get_tokens_block_quote_bleading_space_index(self, token: MarkdownToken) -> int:
+    def get_tokens_block_quote_bleading_space_index(
+        self, token: MarkdownToken, alternate_index: int = -1
+    ) -> int:
         """
         Get the index of the token within the contain block quote's bleading_spaces string.
         """
-        container_index = self.get_container_stack_size() - 1
+        container_index = (
+            self.get_container_stack_size() - 1
+            if alternate_index < 0
+            else alternate_index
+        )
         assert self.__container_token_stack[container_index].is_block_quote_start
         block_quote_token = cast(
             BlockQuoteMarkdownToken, self.__container_token_stack[container_index]
@@ -191,3 +197,42 @@ class LeadingSpaceIndexTracker:
             LeadingSpaceIndexTracker.calculate_token_line_number(token)
             - block_quote_token.line_number
         ) - (last_closed_container_info.adjustment - last_closed_container_info.count2)
+
+    def get_tokens_list_leading_space_index(
+        self, token: MarkdownToken, alternate_index: int = -1
+    ) -> int:
+
+        initial_index = self.get_container_stack_size() - 1
+        container_index = alternate_index
+        last_closed_container_info = self.get_closed_container_info(-1)
+
+        assert not last_closed_container_info.adjustment
+        # if last_closed_container_info.adjustment:
+        #     adjust = 2 if container_index >= 0 else 1
+        # else:
+        adjust = self.__calculate_adjust(initial_index, container_index)
+        # endif
+
+        index = (
+            LeadingSpaceIndexTracker.calculate_token_line_number(token)
+            - self.get_container_stack_item(initial_index).line_number
+        )
+        index -= last_closed_container_info.adjustment
+        index -= adjust
+        return index
+
+    def __calculate_adjust(self, initial_index: int, container_index: int) -> int:
+
+        last_closed_container_info = self.get_closed_container_info(-1)
+        assert (
+            initial_index < 2
+            or container_index
+            or not last_closed_container_info.adjustment
+        )
+        return (
+            0
+            if initial_index >= 1
+            and not container_index
+            and last_closed_container_info.adjustment
+            else 1
+        )
diff --git a/pymarkdown/transform_gfm/transform_to_gfm_list_looseness.py b/pymarkdown/transform_gfm/transform_to_gfm_list_looseness.py
index adb087e1..6c40313a 100644
--- a/pymarkdown/transform_gfm/transform_to_gfm_list_looseness.py
+++ b/pymarkdown/transform_gfm/transform_to_gfm_list_looseness.py
@@ -187,7 +187,7 @@ class TransformToGfmListLooseness:
     @staticmethod
     def __handle_block_quote_end_calc(
         actual_tokens: List[MarkdownToken], search_index: int, current_token_index: int
-    ) -> Tuple[bool, bool]:
+    ) -> bool:
         stop_me = TransformToGfmListLooseness.__is_token_loose(
             actual_tokens, search_index + 1, True
         )
@@ -201,11 +201,7 @@ class TransformToGfmListLooseness:
             block_quote_spaces_count = len(next_token.bleading_spaces.split("\n"))  # type: ignore
             end_block_quote_line = next_token.line_number + block_quote_spaces_count
             stop_me = not blank_token.line_number < end_block_quote_line
-
-        is_loose = stop_me
-        if stop_me:
-            POGGER.debug("!!!LOOSE-look back at end!!!")
-        return is_loose, stop_me
+        return stop_me
 
     @staticmethod
     def __handle_block_quote_end(
@@ -235,12 +231,10 @@ class TransformToGfmListLooseness:
                 new_index < len(actual_tokens) and actual_tokens[new_index].is_end_token
             ) and actual_tokens[new_index].is_list_end
             if not keep_checking:
-                (
-                    is_loose,
-                    stop_me,
-                ) = TransformToGfmListLooseness.__handle_block_quote_end_calc(
+                (stop_me) = TransformToGfmListLooseness.__handle_block_quote_end_calc(
                     actual_tokens, search_index, current_token_index
                 )
+                is_loose = stop_me
         return stop_me, is_loose, stack_count
 
     @staticmethod
diff --git a/pymarkdown/transform_markdown/transform_containers.py b/pymarkdown/transform_markdown/transform_containers.py
index f3d5eb56..2994b6c6 100644
--- a/pymarkdown/transform_markdown/transform_containers.py
+++ b/pymarkdown/transform_markdown/transform_containers.py
@@ -1398,27 +1398,28 @@ class TransformContainers:
         POGGER.debug(
             f"inner_token_index={inner_token_index} < len(split)={len(split_leading_spaces)}"
         )
-        if inner_token_index < len(split_leading_spaces):
-            POGGER.debug(
-                f" adj-->container_line>:{ParserHelper.make_value_visible(container_line)}:<"
-            )
-            token_leading_spaces = split_leading_spaces[inner_token_index]
-            if (
-                current_changed_record
-                and not current_changed_record.is_container_start
-                and current_changed_record.item_d is not None
-                and current_changed_record.item_d.extra_end_data is not None
-            ):
-                token_end_data = current_changed_record.item_d.extra_end_data
-                assert token_end_data.startswith(
-                    token_leading_spaces
-                ) and container_line.startswith(token_end_data)
-                token_leading_spaces = ""
+        # following assert was if to return
+        assert inner_token_index < len(split_leading_spaces)
+        POGGER.debug(
+            f" adj-->container_line>:{ParserHelper.make_value_visible(container_line)}:<"
+        )
+        token_leading_spaces = split_leading_spaces[inner_token_index]
+        if (
+            current_changed_record
+            and not current_changed_record.is_container_start
+            and current_changed_record.item_d is not None
+            and current_changed_record.item_d.extra_end_data is not None
+        ):
+            token_end_data = current_changed_record.item_d.extra_end_data
+            assert token_end_data.startswith(
+                token_leading_spaces
+            ) and container_line.startswith(token_end_data)
+            token_leading_spaces = ""
 
-            container_line = token_leading_spaces + container_line
-            POGGER.debug(
-                f" adj-->container_line>:{ParserHelper.make_value_visible(container_line)}:<"
-            )
+        container_line = token_leading_spaces + container_line
+        POGGER.debug(
+            f" adj-->container_line>:{ParserHelper.make_value_visible(container_line)}:<"
+        )
         return container_line
 
     # pylint: disable=too-many-arguments
@@ -1473,14 +1474,14 @@ class TransformContainers:
         if token_stack[-1].is_list_start and removed_tokens[-1].is_list_start:
             removed_list_token = cast(ListStartMarkdownToken, removed_tokens[-1])
             removed_token_index = removed_token_indices[-1]
-            if removed_list_token.leading_spaces is None:
-                assert removed_token_index == 0
-            else:
-                removed_token_split_spaces = removed_list_token.leading_spaces.split(
-                    "\n"
-                )
-                assert removed_token_index < len(removed_token_split_spaces)
-                removed_token_indices[-1] += 1
+            assert removed_list_token.leading_spaces is not None
+            # if removed_list_token.leading_spaces is None:
+            #     assert removed_token_index == 0
+            # else:
+            removed_token_split_spaces = removed_list_token.leading_spaces.split("\n")
+            assert removed_token_index < len(removed_token_split_spaces)
+            removed_token_indices[-1] += 1
+            # end else
             do_it = False
             block_me = True
         if do_it:
@@ -1900,10 +1901,11 @@ class TransformContainers:
                 else cast(ListStartMarkdownToken, token_stack[-1])
             )
             split_leading_spaces = None
-            if prev_list_token.leading_spaces is not None:
-                split_leading_spaces = prev_list_token.leading_spaces.split(
-                    ParserHelper.newline_character
-                )
+            # following assert was if over next line
+            assert prev_list_token.leading_spaces is not None
+            split_leading_spaces = prev_list_token.leading_spaces.split(
+                ParserHelper.newline_character
+            )
         if split_leading_spaces is not None and last_container_token_index < len(
             split_leading_spaces
         ):


Test patch:
diff --git a/publish/test-results.json b/publish/test-results.json
index 95d51a6e..ebafd8ad 100644
--- a/publish/test-results.json
+++ b/publish/test-results.json
@@ -1156,10 +1156,10 @@
         },
         {
             "name": "test.rules.test_md005",
-            "totalTests": 95,
+            "totalTests": 93,
             "failedTests": 0,
             "errorTests": 0,
-            "skippedTests": 2,
+            "skippedTests": 0,
             "elapsedTimeInMilliseconds": 0
         },
         {
@@ -1204,7 +1204,7 @@
         },
         {
             "name": "test.rules.test_md012",
-            "totalTests": 15,
+            "totalTests": 78,
             "failedTests": 0,
             "errorTests": 0,
             "skippedTests": 0,
@@ -1300,10 +1300,10 @@
         },
         {
             "name": "test.rules.test_md027",
-            "totalTests": 118,
+            "totalTests": 123,
             "failedTests": 0,
             "errorTests": 0,
-            "skippedTests": 0,
+            "skippedTests": 4,
             "elapsedTimeInMilliseconds": 0
         },
         {
@@ -1367,7 +1367,7 @@
             "totalTests": 653,
             "failedTests": 0,
             "errorTests": 0,
-            "skippedTests": 59,
+            "skippedTests": 61,
             "elapsedTimeInMilliseconds": 0
         },
         {
@@ -1620,10 +1620,10 @@
         },
         {
             "name": "test.test_markdown_extra",
-            "totalTests": 220,
+            "totalTests": 257,
             "failedTests": 0,
             "errorTests": 0,
-            "skippedTests": 3,
+            "skippedTests": 5,
             "elapsedTimeInMilliseconds": 0
         },
         {
diff --git a/test/gfm/test_markdown_list_blocks.py b/test/gfm/test_markdown_list_blocks.py
index 0ec506da..cf39ec92 100644
--- a/test/gfm/test_markdown_list_blocks.py
+++ b/test/gfm/test_markdown_list_blocks.py
@@ -2715,15 +2715,15 @@ continued here.
     expected_tokens = [
         "[BLANK(1,1):]",
         "[block-quote(2,1)::> ]",
-        "[olist(2,3):.:1:5::\n\n]",
+        "[olist(2,3):.:1:5::\n]",
         "[block-quote(2,6)::> \n\n]",
         "[para(2,8):\n]",
         "[text(2,8):Blockquote\ncontinued here.::\n]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(4,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -2900,15 +2900,15 @@ def test_list_blocks_271ax():
 """
     expected_tokens = [
         "[block-quote(1,1)::> ]",
-        "[olist(1,3):.:1:5::\n]",
+        "[olist(1,3):.:1:5::]",
         "[block-quote(1,6)::> \n> \n]",
         "[para(1,8):\n]",
         "[text(1,8):Blockquote\ncontinued here.::\n]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(3,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(3,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -2938,15 +2938,15 @@ def test_list_blocks_271aa():
 not here"""
     expected_tokens = [
         "[block-quote(1,1)::> ]",
-        "[olist(1,3):.:1:5::\n]",
+        "[olist(1,3):.:1:5::]",
         "[block-quote(1,6)::> \n> \n]",
         "[para(1,8):\n]",
         "[text(1,8):Blockquote\ncontinued here.::\n]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(3,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(3,1):]",
         "[para(4,1):]",
         "[text(4,1):not here:]",
         "[end-para:::True]",
diff --git a/test/nested_three/test_markdown_nested_three_block_block_unordered.py b/test/nested_three/test_markdown_nested_three_block_block_unordered.py
index 8fa7d370..6470b288 100644
--- a/test/nested_three/test_markdown_nested_three_block_block_unordered.py
+++ b/test/nested_three/test_markdown_nested_three_block_block_unordered.py
@@ -2705,7 +2705,7 @@ def test_nested_three_block_block_unordered_nl_extra_block_drop_block_with_fence
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > ]",
-        "[ulist(1,5):+::6::\n\n  þ\n  \n  \n  \n]",
+        "[ulist(1,5):+::6::\n\n  þ\n  \n  \n  ]",
         "[tbreak(1,7):-::--------]",
         "[block-quote(2,7)::> \n> >   > \n> > ]",
         "[para(2,9):\n]",
@@ -2716,10 +2716,10 @@ def test_nested_three_block_block_unordered_nl_extra_block_drop_block_with_fence
         "[text(5,1):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(7,7):-::--------]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -2766,7 +2766,7 @@ def test_nested_three_block_block_unordered_nl_extra_block_drop_block_with_blank
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > \n> >\n> > ]",
-        "[ulist(1,5):+::6::\n\n\n  \n  \n  \n\n  \n]",
+        "[ulist(1,5):+::6::\n\n\n  \n  \n  \n\n  ]",
         "[tbreak(1,7):-::--------]",
         "[block-quote(2,7)::> \n> >   > \n> >]",
         "[para(2,9):\n]",
@@ -2779,10 +2779,10 @@ def test_nested_three_block_block_unordered_nl_extra_block_drop_block_with_blank
         "[end-fcode-block:::3:False]",
         "[BLANK(8,4):]",
         "[tbreak(9,7):-::--------]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -2828,7 +2828,7 @@ def test_nested_three_block_block_unordered_nl_extra_list_li_drop_list_with_fenc
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > \n> > \n> > \n> > ]",
-        "[ulist(1,5):+::6::  \n  \n  \n]",
+        "[ulist(1,5):+::6::  \n  \n  ]",
         "[tbreak(1,7):_::______]",
         "[ulist(2,7):+::8:  :    \n  ]",
         "[para(2,9):\n]",
@@ -2843,10 +2843,10 @@ def test_nested_three_block_block_unordered_nl_extra_list_li_drop_list_with_fenc
         "[text(6,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(8,7):_::______]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -2895,7 +2895,7 @@ def test_nested_three_block_block_unordered_nl_extra_list_li_drop_list_with_blan
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> >\n> > \n> > \n> > \n> >\n> > ]",
-        "[ulist(1,5):+::6::  \n  \n\n  \n]",
+        "[ulist(1,5):+::6::  \n  \n\n  ]",
         "[tbreak(1,7):_::______]",
         "[ulist(2,7):+::8:  :    \n\n  ]",
         "[para(2,9):\n]",
@@ -2912,10 +2912,10 @@ def test_nested_three_block_block_unordered_nl_extra_list_li_drop_list_with_blan
         "[end-fcode-block:::3:False]",
         "[BLANK(9,4):]",
         "[tbreak(10,7):_::______]",
-        "[BLANK(11,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(11,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -3093,7 +3093,7 @@ def test_nested_three_block_block_unordered_extra_list_li_drop_list_thematics_ar
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > \n> > \n> > \n> > \n> > ]",
-        "[ulist(1,5):+::6::  \n  \n  \n  \n]",
+        "[ulist(1,5):+::6::  \n  \n  \n  ]",
         "[tbreak(1,7):_::______]",
         "[ulist(2,7):+::8:  :    \n  ]",
         "[para(2,9):\n]",
@@ -3109,10 +3109,10 @@ def test_nested_three_block_block_unordered_extra_list_li_drop_list_thematics_ar
         "[text(7,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(9,7):_::______]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -3163,7 +3163,7 @@ def test_nested_three_block_block_unordered_extra_list_li_drop_list_thematics_ar
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > \n> >\n> > \n> > \n> > \n> >\n> > ]",
-        "[ulist(1,5):+::6::\n  \n  \n  \n\n  \n]",
+        "[ulist(1,5):+::6::\n  \n  \n  \n\n  ]",
         "[tbreak(1,7):_::______]",
         "[ulist(2,7):+::8:  :    \n  ]",
         "[para(2,9):\n]",
@@ -3181,10 +3181,10 @@ def test_nested_three_block_block_unordered_extra_list_li_drop_list_thematics_ar
         "[end-fcode-block:::3:False]",
         "[BLANK(10,4):]",
         "[tbreak(11,7):_::______]",
-        "[BLANK(12,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(12,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -3511,7 +3511,7 @@ def test_nested_three_block_block_unordered_extra_list_li_thematics_first_with_s
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > \n> > \n> > \n> > \n> > ]",
-        "[ulist(1,5):+::6::  \n  \n  \n  \n]",
+        "[ulist(1,5):+::6::  \n  \n  \n  ]",
         "[tbreak(1,7):_::______]",
         "[ulist(2,7):+::8:  :    \n   ]",
         "[para(2,9):\n]",
@@ -3527,10 +3527,10 @@ def test_nested_three_block_block_unordered_extra_list_li_thematics_first_with_s
         "[text(7,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(9,7):_::______]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -3578,7 +3578,7 @@ def test_nested_three_block_block_unordered_extra_list_li_thematics_first_with_d
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > \n> > \n> > \n> > \n> > ]",
-        "[ulist(1,5):+::6::  \n  \n  \n]",
+        "[ulist(1,5):+::6::  \n  \n  ]",
         "[tbreak(1,7):_::______]",
         "[ulist(2,7):+::8:  :    \n    \n  ]",
         "[para(2,9):\n]",
@@ -3594,10 +3594,10 @@ def test_nested_three_block_block_unordered_extra_list_li_thematics_first_with_d
         "[text(7,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(9,7):_::______]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -3645,7 +3645,7 @@ def test_nested_three_block_block_unordered_extra_list_thematics_first_with_doub
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > \n> > \n> > \n> > ]",
-        "[ulist(1,5):+::6::  \n  \n  \n]",
+        "[ulist(1,5):+::6::  \n  \n  ]",
         "[tbreak(1,7):_::______]",
         "[ulist(2,7):+::8:  :    \n    \n  ]",
         "[para(2,9):\n]",
@@ -3657,10 +3657,10 @@ def test_nested_three_block_block_unordered_extra_list_thematics_first_with_doub
         "[text(6,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(8,7):_::______]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -3706,7 +3706,7 @@ def test_nested_three_block_block_unordered_extra_list_single_line_thematics_fir
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > \n> > \n> > ]",
-        "[ulist(1,5):+::6::  \n  \n  \n]",
+        "[ulist(1,5):+::6::  \n  \n  ]",
         "[tbreak(1,7):_::______]",
         "[ulist(2,7):+::8:  :    \n  ]",
         "[para(2,9):]",
@@ -3718,10 +3718,10 @@ def test_nested_three_block_block_unordered_extra_list_single_line_thematics_fir
         "[text(5,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(7,7):_::______]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
@@ -3765,17 +3765,17 @@ def test_nested_three_block_block_unordered_thematics_around_fenced():
     expected_tokens = [
         "[block-quote(1,1)::]",
         "[block-quote(1,3)::> > \n> > \n> > \n> > \n> > \n> > ]",
-        "[ulist(1,5):+::6::  \n  \n  \n  \n  \n]",
+        "[ulist(1,5):+::6::  \n  \n  \n  \n  ]",
         "[tbreak(1,7):_::______]",
         "[tbreak(2,9):_:  :______]",
         "[fcode-block(3,7):`:3:block:::::]",
         "[text(4,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(6,7):_::______]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <blockquote>
diff --git a/test/nested_three/test_markdown_nested_three_block_unordered_block.py b/test/nested_three/test_markdown_nested_three_block_unordered_block.py
index 878ce044..bf216bfb 100644
--- a/test/nested_three/test_markdown_nested_three_block_unordered_block.py
+++ b/test/nested_three/test_markdown_nested_three_block_unordered_block.py
@@ -2346,7 +2346,7 @@ def test_nested_three_block_unordered_block_fenced_empty_with_thematics():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n]",
+        "[ulist(1,3):+::4::\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[fcode-block(2,7):`:3:block:::::]",
@@ -2357,9 +2357,9 @@ def test_nested_three_block_unordered_block_fenced_empty_with_thematics():
         "[para(5,5):]",
         "[text(5,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2399,7 +2399,7 @@ def test_nested_three_block_unordered_block_fenced_empty_with_blanks_with_themat
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n]",
         "[block-quote(1,5)::> \n>   >\n>   > \n>   > \n>   >\n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[BLANK(2,6):]",
@@ -2412,9 +2412,9 @@ def test_nested_three_block_unordered_block_fenced_empty_with_blanks_with_themat
         "[para(7,5):]",
         "[text(7,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2453,7 +2453,7 @@ def test_nested_three_block_unordered_block_fenced_with_thematics():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[fcode-block(2,7):`:3:block:::::]",
@@ -2465,9 +2465,9 @@ def test_nested_three_block_unordered_block_fenced_with_thematics():
         "[para(6,5):]",
         "[text(6,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2509,7 +2509,7 @@ def test_nested_three_block_unordered_block_fenced_with_blanks_with_thematics():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   >\n>   > \n>   > \n>   > \n>   >\n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[BLANK(2,6):]",
@@ -2523,9 +2523,9 @@ def test_nested_three_block_unordered_block_fenced_with_blanks_with_thematics():
         "[para(8,5):]",
         "[text(8,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2565,7 +2565,7 @@ def test_nested_three_block_unordered_block_fenced_with_text_before_with_themati
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[para(2,7):]",
@@ -2580,9 +2580,9 @@ def test_nested_three_block_unordered_block_fenced_with_text_before_with_themati
         "[para(7,5):]",
         "[text(7,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2625,7 +2625,7 @@ def test_nested_three_block_unordered_block_fenced_with_blanks_with_text_before_
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   >\n>   > \n>   > \n>   > \n>   >\n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[para(2,7):]",
@@ -2642,9 +2642,9 @@ def test_nested_three_block_unordered_block_fenced_with_blanks_with_text_before_
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2685,7 +2685,7 @@ def test_nested_three_block_unordered_block_fenced_with_text_after_with_thematic
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[fcode-block(2,7):`:3:block:::::]",
@@ -2700,9 +2700,9 @@ def test_nested_three_block_unordered_block_fenced_with_text_after_with_thematic
         "[para(7,5):]",
         "[text(7,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2745,7 +2745,7 @@ def test_nested_three_block_unordered_block_fenced_with_blanks_with_text_after_w
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   >\n>   > \n>   > \n>   > \n>   >\n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[BLANK(2,6):]",
@@ -2762,9 +2762,9 @@ def test_nested_three_block_unordered_block_fenced_with_blanks_with_text_after_w
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2804,7 +2804,7 @@ def test_nested_three_block_unordered_block_fenced_multiline_with_thematics():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[fcode-block(2,7):`:3:block:::::]",
@@ -2816,9 +2816,9 @@ def test_nested_three_block_unordered_block_fenced_multiline_with_thematics():
         "[para(7,5):]",
         "[text(7,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2857,7 +2857,7 @@ def test_nested_three_block_unordered_block_thematics_around_text_lines():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[para(2,7):\n\n]",
@@ -2869,9 +2869,9 @@ def test_nested_three_block_unordered_block_thematics_around_text_lines():
         "[para(6,5):]",
         "[text(6,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2913,7 +2913,7 @@ def test_nested_three_block_unordered_block_thematics_around_blanks_around_text_
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[BLANK(2,7):]",
@@ -2927,9 +2927,9 @@ def test_nested_three_block_unordered_block_thematics_around_blanks_around_text_
         "[para(8,5):]",
         "[text(8,5):more:]",
         "[end-para:::True]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2968,7 +2968,7 @@ def test_nested_three_block_unordered_block_thematics_around_text_lines_with_tex
 """
     expected_tokens = [
         "[block-quote(1,1)::> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > \n]",
         "[tbreak(1,7):-::-----]",
         "[para(2,7):\n\n]",
@@ -2979,9 +2979,9 @@ def test_nested_three_block_unordered_block_thematics_around_text_lines_with_tex
         "[text(6,7):more:]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3024,7 +3024,7 @@ def test_nested_three_block_unordered_nl_block_drop_block_thematics_around_fence
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::\n\n  þ\n  \n  \n  \n  \n]",
+        "[ulist(1,3):+::4::\n\n  þ\n  \n  \n  \n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -3042,9 +3042,9 @@ def test_nested_three_block_unordered_nl_block_drop_block_thematics_around_fence
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3090,7 +3090,7 @@ def test_nested_three_block_unordered_nl_block_drop_block_thematics_around_blank
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n>\n> \n> \n> \n>\n> \n> ]",
-        "[ulist(1,3):+::4::\n\n  þ\n\n  \n  \n  \n\n  \n]",
+        "[ulist(1,3):+::4::\n\n  þ\n\n  \n  \n  \n\n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -3110,9 +3110,9 @@ def test_nested_three_block_unordered_nl_block_drop_block_thematics_around_blank
         "[para(11,5):]",
         "[text(11,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(12,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(12,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3306,7 +3306,7 @@ def test_nested_three_block_unordered_block_extra_block_single_line_drop_block_t
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>   > > \n>   > ]",
@@ -3324,9 +3324,9 @@ def test_nested_three_block_unordered_block_extra_block_single_line_drop_block_t
         "[para(8,5):]",
         "[text(8,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3569,7 +3569,7 @@ def test_nested_three_block_unordered_block_extra_block_drop_block_with_blanks_a
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   >\n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>   > > \n>   > > \n>   >\n>   > ]",
@@ -3588,9 +3588,9 @@ def test_nested_three_block_unordered_block_extra_block_drop_block_with_blanks_a
         "[para(10,5):]",
         "[text(10,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(11,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(11,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3831,7 +3831,7 @@ def test_nested_three_block_unordered_block_extra_block_drop_block_extra_block_d
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>   > > \n>   > > \n>   > ]",
@@ -3854,9 +3854,9 @@ def test_nested_three_block_unordered_block_extra_block_drop_block_extra_block_d
         "[para(11,5):]",
         "[text(11,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(12,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(12,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3911,7 +3911,7 @@ def test_nested_three_block_unordered_block_extra_block_drop_block_extra_block_d
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   >\n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>   > > \n>   > > \n>   > ]",
@@ -3936,9 +3936,9 @@ def test_nested_three_block_unordered_block_extra_block_drop_block_extra_block_d
         "[para(13,5):]",
         "[text(13,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(14,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(14,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3987,7 +3987,7 @@ def test_nested_three_block_unordered_nl_block_drop_block_with_fenced():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::\n\n  þ\n  \n  \n]",
+        "[ulist(1,3):+::4::\n\n  þ\n  \n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -4003,9 +4003,9 @@ def test_nested_three_block_unordered_nl_block_drop_block_with_fenced():
         "[para(7,5):]",
         "[text(7,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4047,7 +4047,7 @@ def test_nested_three_block_unordered_nl_block_drop_block_with_blanks_around_fen
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n>\n> ]",
-        "[ulist(1,3):+::4::\n\n\n  \n  \n  \n\n]",
+        "[ulist(1,3):+::4::\n\n\n  \n  \n  \n]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -4065,9 +4065,9 @@ def test_nested_three_block_unordered_nl_block_drop_block_with_blanks_around_fen
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4109,7 +4109,7 @@ def test_nested_three_block_unordered_block_thematics_around_text_and_fenced():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[para(2,7):]",
@@ -4124,9 +4124,9 @@ def test_nested_three_block_unordered_block_thematics_around_text_and_fenced():
         "[para(7,5):]",
         "[text(7,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4168,7 +4168,7 @@ def test_nested_three_block_unordered_block_thematics_around_text_and_blanks_aro
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   >\n>   > \n>   > \n>   > \n>   >\n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[para(2,7):]",
@@ -4185,9 +4185,9 @@ def test_nested_three_block_unordered_block_thematics_around_text_and_blanks_aro
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4222,7 +4222,7 @@ def test_nested_three_block_unordered_block_thematic_drop_block_and_list_with_te
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::]",
+        "[ulist(1,3):+::4:]",
         "[block-quote(1,5)::> ]",
         "[tbreak(1,7):-::-----]",
         "[end-block-quote:::True]",
@@ -4230,9 +4230,9 @@ def test_nested_three_block_unordered_block_thematic_drop_block_and_list_with_te
         "[para(2,5):]",
         "[text(2,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(3,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(3,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4264,7 +4264,7 @@ def test_nested_three_block_unordered_block_thematic_nl_text_drop_block_and_list
 """
     expected_tokens = [
         "[block-quote(1,1)::> ]",
-        "[ulist(1,3):+::4::\n]",
+        "[ulist(1,3):+::4::]",
         "[block-quote(1,5)::> \n>   > \n> ]",
         "[tbreak(1,7):-::-----]",
         "[para(2,7):]",
@@ -4275,9 +4275,9 @@ def test_nested_three_block_unordered_block_thematic_nl_text_drop_block_and_list
         "[para(3,5):]",
         "[text(3,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4310,7 +4310,7 @@ def test_nested_three_block_unordered_block_thematic_nl_fenced_with_drop_block_l
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n]",
+        "[ulist(1,3):+::4::]",
         "[block-quote(1,5)::> \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[fcode-block(2,7):`:3:block:::::]",
@@ -4320,9 +4320,9 @@ def test_nested_three_block_unordered_block_thematic_nl_fenced_with_drop_block_l
         "[para(3,5):]",
         "[text(3,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4356,7 +4356,7 @@ def test_nested_three_block_unordered_block_fenced_with_drop_right_after():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n]",
+        "[ulist(1,3):+::4::\n]",
         "[block-quote(1,5)::> \n>   > \n>   > ]",
         "[fcode-block(1,7):`:3:block:::::]",
         "[text(2,7):abc:]",
@@ -4366,9 +4366,9 @@ def test_nested_three_block_unordered_block_fenced_with_drop_right_after():
         "[para(4,5):]",
         "[text(4,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4401,7 +4401,7 @@ def test_nested_three_block_unordered_block_empty_fenced_with_drop_right_after()
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n]",
+        "[ulist(1,3):+::4::]",
         "[block-quote(1,5)::> \n>   > ]",
         "[fcode-block(1,7):`:3:block:::::]",
         "[end-fcode-block:::3:False]",
@@ -4410,9 +4410,9 @@ def test_nested_three_block_unordered_block_empty_fenced_with_drop_right_after()
         "[para(3,5):]",
         "[text(3,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4453,7 +4453,7 @@ def test_nested_three_block_unordered_block_thematics_around_blanks_around_text_
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n  \n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n\n  \n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[BLANK(2,7):]",
@@ -4480,9 +4480,9 @@ def test_nested_three_block_unordered_block_thematics_around_blanks_around_text_
         "[para(12,5):]",
         "[text(12,5):more:]",
         "[end-para:::True]",
-        "[BLANK(13,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(13,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4527,7 +4527,7 @@ def test_nested_three_block_unordered_block_thematics_around_blank_drop_block_li
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::4::\n\n  \n]",
+        "[ulist(1,3):+::4::\n\n  ]",
         "[block-quote(1,5)::> \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[BLANK(2,7):]",
@@ -4537,9 +4537,9 @@ def test_nested_three_block_unordered_block_thematics_around_blank_drop_block_li
         "[para(4,5):\n]",
         "[text(4,5):more\nthis is more::\n]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4575,7 +4575,7 @@ def test_nested_three_block_unordered_block_thematics_around_blank_drop_block_li
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[BLANK(2,7):]",
@@ -4587,9 +4587,9 @@ def test_nested_three_block_unordered_block_thematics_around_blank_drop_block_li
         "[text(4,7):more\nthis is more::\n]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4633,7 +4633,7 @@ def test_nested_three_block_unordered_nl_block_drop_block_headings_around_fenced
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::\n\n  þ\n  \n  \n  \n  \n]",
+        "[ulist(1,3):+::4::\n\n  þ\n  \n  \n  \n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -4655,9 +4655,9 @@ def test_nested_three_block_unordered_nl_block_drop_block_headings_around_fenced
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4701,7 +4701,7 @@ def test_nested_three_block_unordered_nl_block_drop_block_blank_thematics_around
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::]",
+        "[ulist(1,3):+::4:]",
         "[ulist(1,5):+::6:  :\n\n\n    \n    \n    \n    \n    ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>     > \n>     > \n>]",
@@ -4720,9 +4720,9 @@ def test_nested_three_block_unordered_nl_block_drop_block_blank_thematics_around
         "[para(10,5):]",
         "[text(10,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(11,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(11,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4770,7 +4770,7 @@ def test_nested_three_block_unordered_extra_block_with_no_space_after_drop_block
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>   > >\n>   > >\n>   > ]",
@@ -4788,9 +4788,9 @@ def test_nested_three_block_unordered_extra_block_with_no_space_after_drop_block
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4837,7 +4837,7 @@ def test_nested_three_block_unordered_extra_block_drop_block_thematic_extra_bloc
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>   > > \n>   > ]",
@@ -4861,9 +4861,9 @@ def test_nested_three_block_unordered_extra_block_drop_block_thematic_extra_bloc
         "[para(10,5):]",
         "[text(10,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(11,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(11,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -4911,7 +4911,7 @@ def test_nested_three_block_unordered_extra_list_drop_list_thematics_around_fenc
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n\n\n\n]",
+        "[ulist(1,3):+::4::\n\n\n\n]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n>   > \n>   > \n>   > ]",
         "[tbreak(1,7):-::-----]",
         "[ulist(2,7):+::8:]",
@@ -4929,9 +4929,9 @@ def test_nested_three_block_unordered_extra_list_drop_list_thematics_around_fenc
         "[para(8,5):]",
         "[text(8,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
diff --git a/test/nested_three/test_markdown_nested_three_block_unordered_unordered.py b/test/nested_three/test_markdown_nested_three_block_unordered_unordered.py
index 21deeb19..bb4d25ce 100644
--- a/test/nested_three/test_markdown_nested_three_block_unordered_unordered.py
+++ b/test/nested_three/test_markdown_nested_three_block_unordered_unordered.py
@@ -2054,7 +2054,7 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_text_and_thema
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n>\n> \n> \n> \n>\n> \n> ]",
-        "[ulist(1,3):+::4::\n  \n  \n  \n\n  \n]",
+        "[ulist(1,3):+::4::\n  \n  \n  \n\n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2074,9 +2074,9 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_text_and_thema
         "[para(11,5):]",
         "[text(11,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(12,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(12,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2123,7 +2123,7 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_text_and_thema
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  \n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2141,9 +2141,9 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_text_and_thema
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2187,7 +2187,7 @@ def test_nested_three_block_unordered_nl_unordered_li_drop_list_with_thematics_a
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  \n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2209,9 +2209,9 @@ def test_nested_three_block_unordered_nl_unordered_li_drop_list_with_thematics_a
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2257,7 +2257,7 @@ def test_nested_three_block_unordered_nl_unordered_li_drop_list_with_thematics_a
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n>\n> \n> \n> \n>\n> \n> ]",
-        "[ulist(1,3):+::4::\n  \n  \n  \n\n  \n]",
+        "[ulist(1,3):+::4::\n  \n  \n  \n\n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2281,9 +2281,9 @@ def test_nested_three_block_unordered_nl_unordered_li_drop_list_with_thematics_a
         "[para(11,5):]",
         "[text(11,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(12,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(12,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2330,7 +2330,7 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_thematics_arou
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  \n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2348,9 +2348,9 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_thematics_arou
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2396,7 +2396,7 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_thematics_arou
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n>\n> \n> \n> \n>\n> \n> ]",
-        "[ulist(1,3):+::4::\n  \n  \n  \n\n  \n]",
+        "[ulist(1,3):+::4::\n  \n  \n  \n\n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2416,9 +2416,9 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_thematics_arou
         "[para(11,5):]",
         "[text(11,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(12,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(12,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2475,13 +2475,13 @@ def test_nested_three_block_unordered_nl_unordered_drop_double_list_with_fenced(
         "[fcode-block(4,3):`:3:block:::::]",
         "[text(5,3):A code block:]",
         "[end-fcode-block:::3:False]",
-        "[ulist(7,3):+::4::]",
+        "[ulist(7,3):+::4:]",
         "[para(7,5):]",
         "[text(7,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2523,7 +2523,7 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_fenced():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n]",
+        "[ulist(1,3):+::4::  \n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2539,9 +2539,9 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_fenced():
         "[para(7,5):]",
         "[text(7,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2583,7 +2583,7 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_blanks_around_
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n>\n> \n> \n> \n>\n> ]",
-        "[ulist(1,3):+::4::  \n  \n\n]",
+        "[ulist(1,3):+::4::  \n  \n]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2601,9 +2601,9 @@ def test_nested_three_block_unordered_nl_unordered_drop_list_with_blanks_around_
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2647,7 +2647,7 @@ def test_nested_three_block_unordered_nl_unordered_para_cont_drop_list_with_fenc
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2664,9 +2664,9 @@ def test_nested_three_block_unordered_nl_unordered_para_cont_drop_list_with_fenc
         "[para(8,5):]",
         "[text(8,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2710,7 +2710,7 @@ def test_nested_three_block_unordered_nl_unordered_para_cont_drop_list_with_blan
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n>\n> \n> \n> \n>\n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n\n  \n]",
+        "[ulist(1,3):+::4::  \n  \n\n  ]",
         "[para(1,5):]",
         "[text(1,5):list 1:]",
         "[end-para:::True]",
@@ -2729,9 +2729,9 @@ def test_nested_three_block_unordered_nl_unordered_para_cont_drop_list_with_blan
         "[para(10,5):]",
         "[text(10,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(11,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(11,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2777,7 +2777,7 @@ def test_nested_three_block_unordered_unordered_extra_list_li_drop_list_fenced()
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::]",
+        "[ulist(1,3):+::4:]",
         "[ulist(1,5):+::6:  :    \n    \n    ]",
         "[tbreak(1,7):-::-----]",
         "[ulist(2,7):+::8:    :      \n    ]",
@@ -2798,9 +2798,9 @@ def test_nested_three_block_unordered_unordered_extra_list_li_drop_list_fenced()
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2851,7 +2851,7 @@ def test_nested_three_block_unordered_unordered_extra_list_li_drop_list_blanks_a
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n>\n> \n> \n> \n>\n> \n> ]",
-        "[ulist(1,3):+::4::]",
+        "[ulist(1,3):+::4:]",
         "[ulist(1,5):+::6:  :    \n    \n\n    ]",
         "[tbreak(1,7):-::-----]",
         "[ulist(2,7):+::8:    :      \n\n    ]",
@@ -2874,9 +2874,9 @@ def test_nested_three_block_unordered_unordered_extra_list_li_drop_list_blanks_a
         "[para(11,5):]",
         "[text(11,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(12,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(12,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2925,7 +2925,7 @@ def test_nested_three_block_unordered_nl_unordered_extra_list_li_drop_list_fence
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::]",
+        "[ulist(1,3):+::4:]",
         "[BLANK(1,4):]",
         "[ulist(2,5):+::6:  :    \n    \n    ]",
         "[tbreak(2,7):-::-----]",
@@ -2947,9 +2947,9 @@ def test_nested_three_block_unordered_nl_unordered_extra_list_li_drop_list_fence
         "[para(10,5):]",
         "[text(10,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(11,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(11,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3000,7 +3000,7 @@ def test_nested_three_block_unordered_nl_unordered_extra_list_li_drop_list_blank
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n>\n> \n> \n> \n>\n> \n> ]",
-        "[ulist(1,3):+::4::]",
+        "[ulist(1,3):+::4:]",
         "[BLANK(1,4):]",
         "[ulist(2,5):+::6:  :    \n    \n\n    ]",
         "[tbreak(2,7):-::-----]",
@@ -3024,9 +3024,9 @@ def test_nested_three_block_unordered_nl_unordered_extra_list_li_drop_list_blank
         "[para(12,5):]",
         "[text(12,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(13,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(13,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3050,7 +3050,7 @@ list 2</li>
 </blockquote>"""
 
     # Act & Assert
-    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=True)
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
 
 
 @pytest.mark.gfm
@@ -3074,7 +3074,7 @@ def test_nested_three_block_unordered_nl_thematics_unordered_extra_list_drop_lis
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::]",
+        "[ulist(1,3):+::4:]",
         "[BLANK(1,4):]",
         "[ulist(2,5):+::6:  :    \n    \n    ]",
         "[tbreak(2,7):-::-----]",
@@ -3092,9 +3092,9 @@ def test_nested_three_block_unordered_nl_thematics_unordered_extra_list_drop_lis
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3141,7 +3141,7 @@ def test_nested_three_block_unordered_nl_unordered_extra_list_drop_listx_fenced(
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  ]",
         "[BLANK(1,4):]",
         "[ulist(2,5):+::6:  :    \n  ]",
         "[para(2,7):\n]",
@@ -3160,9 +3160,9 @@ def test_nested_three_block_unordered_nl_unordered_extra_list_drop_listx_fenced(
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3205,7 +3205,7 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_block_headings_
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::]",
+        "[ulist(1,3):+::4:]",
         "[ulist(1,5):+::6:  :\n\n  þ\n    \n    \n    \n    ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>     > \n>     > \n> ]",
@@ -3227,9 +3227,9 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_block_headings_
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3277,7 +3277,7 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_block_html_arou
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::]",
+        "[ulist(1,3):+::4:]",
         "[ulist(1,5):+::6:  :\n\n  þ\n    \n    \n    \n    ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>     > \n>     > \n> ]",
@@ -3299,9 +3299,9 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_block_html_arou
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3349,7 +3349,7 @@ def test_nested_three_block_unordered_unordered_extra_block_with_extra_space_ind
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  \n  ]",
         "[ulist(1,5):+::6:  :\n\n  þ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>     > \n>     > \n> ]",
@@ -3371,9 +3371,9 @@ def test_nested_three_block_unordered_unordered_extra_block_with_extra_space_ind
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3421,7 +3421,7 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_list_html_aroun
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  \n  ]",
         "[ulist(1,5):+::6:  :\n\n  þ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>     > \n>     > \n> ]",
@@ -3443,9 +3443,9 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_list_html_aroun
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3512,13 +3512,13 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_list_extra_inde
         "[html-block(8,3)]",
         "[text(8,4):<!-- after -->: ]",
         "[end-html-block:::False]",
-        "[ulist(9,3):+::4::]",
+        "[ulist(9,3):+::4:]",
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3587,13 +3587,13 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_block_drop_list
         "[html-block(8,3)]",
         "[text(8,3):<!-- after -->:]",
         "[end-html-block:::False]",
-        "[ulist(9,3):+::4::]",
+        "[ulist(9,3):+::4:]",
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3644,8 +3644,8 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_block_drop_list
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n  \n]",
-        "[ulist(1,5):+::6:  :\n\n  \u00fe]",
+        "[ulist(1,3):+::4::  \n  \n  \n  ]",
+        "[ulist(1,5):+::6:  :\n\n  þ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>     > \n>     > \n> ]",
         "[para(2,9):\n]",
@@ -3662,9 +3662,9 @@ def test_nested_three_block_unordered_unordered_extra_block_drop_block_drop_list
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3713,7 +3713,7 @@ def test_nested_three_block_unordered_unordered_extra_list_li_drop_list_thematic
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> \n> ]",
         "[ulist(1,3):+::4:]",
-        "[ulist(1,5):+::6:  :    \n    \n    \n    \n]",
+        "[ulist(1,5):+::6:  :    \n    \n    \n    ]",
         "[tbreak(1,7):_::______]",
         "[ulist(2,7):+::8:    :      \n    ]",
         "[para(2,9):\n]",
@@ -3729,10 +3729,10 @@ def test_nested_three_block_unordered_unordered_extra_list_li_drop_list_thematic
         "[text(7,5):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(9,7):_::______]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
diff --git a/test/nested_three/test_markdown_nested_three_ordered_block_unordered.py b/test/nested_three/test_markdown_nested_three_ordered_block_unordered.py
index be1cc50c..680396e5 100644
--- a/test/nested_three/test_markdown_nested_three_ordered_block_unordered.py
+++ b/test/nested_three/test_markdown_nested_three_ordered_block_unordered.py
@@ -1416,17 +1416,17 @@ def test_nested_three_ordered_block_unordered_thematics_around_fenced():
    >   ----
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > \n   > ]",
-        "[ulist(1,6):+::7::  \n  \n  \n  \n]",
+        "[ulist(1,6):+::7::  \n  \n  \n  ]",
         "[tbreak(1,8):-::----]",
         "[fcode-block(2,8):`:3:block:::::]",
         "[text(3,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(5,8):-::----]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
@@ -1468,9 +1468,9 @@ def test_nested_three_ordered_block_unordered_extra_block_drop_block_with_headin
    >   # header 2
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > \n   > \n   > ]",
-        "[ulist(1,6):+::7::\n\n  þ\n  \n  \n  \n  \n]",
+        "[ulist(1,6):+::7::\n\n  þ\n  \n  \n  \n  ]",
         "[tbreak(1,8):-::----]",
         "[block-quote(2,8)::> \n   >   > \n   > ]",
         "[para(2,10):\n]",
@@ -1486,9 +1486,9 @@ def test_nested_three_ordered_block_unordered_extra_block_drop_block_with_headin
         "[atx(8,8):1:0:]",
         "[text(8,10):header 2: ]",
         "[end-atx::]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
@@ -1535,9 +1535,9 @@ def test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_fence
    >   ----
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > \n   > \n   > \n   > \n   > ]",
-        "[ulist(1,6):+::7::  \n  \n  \n]",
+        "[ulist(1,6):+::7::  \n  \n  ]",
         "[tbreak(1,8):-::----]",
         "[ulist(2,8):+::9:  :    \n  ]",
         "[para(2,10):\n]",
@@ -1552,9 +1552,9 @@ def test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_fence
         "[text(6,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(8,8):-::----]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
@@ -1603,9 +1603,9 @@ def test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_blank
    >   ----
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > \n   >\n   > \n   > \n   > \n   >\n   > ]",
-        "[ulist(1,6):+::7::  \n  \n\n  \n]",
+        "[ulist(1,6):+::7::  \n  \n\n  ]",
         "[tbreak(1,8):-::----]",
         "[ulist(2,8):+::9:  :    \n\n  ]",
         "[para(2,10):\n]",
@@ -1622,9 +1622,9 @@ def test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_blank
         "[end-fcode-block:::3:False]",
         "[BLANK(9,5):]",
         "[tbreak(10,8):-::----]",
-        "[BLANK(11,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(11,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
@@ -1672,9 +1672,9 @@ def test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_thema
    >   ----
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > \n   > \n   > \n   > \n   > \n   > ]",
-        "[ulist(1,6):+::7::  \n  \n  \n  \n]",
+        "[ulist(1,6):+::7::  \n  \n  \n  ]",
         "[tbreak(1,8):-::----]",
         "[ulist(2,8):+::9:  :    \n  ]",
         "[para(2,10):\n]",
@@ -1690,9 +1690,9 @@ def test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_thema
         "[text(7,3):A code block:]",
         "[end-fcode-block:::3:False]",
         "[tbreak(9,8):-::----]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
@@ -1743,9 +1743,9 @@ def test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_thema
    >   ----
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > \n   > \n   >\n   > \n   > \n   > \n   >\n   > ]",
-        "[ulist(1,6):+::7::\n  \n  \n  \n\n  \n]",
+        "[ulist(1,6):+::7::\n  \n  \n  \n\n  ]",
         "[tbreak(1,8):-::----]",
         "[ulist(2,8):+::9:  :    \n  ]",
         "[para(2,10):\n]",
@@ -1763,9 +1763,9 @@ def test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_thema
         "[end-fcode-block:::3:False]",
         "[BLANK(10,5):]",
         "[tbreak(11,8):-::----]",
-        "[BLANK(12,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(12,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
@@ -1900,9 +1900,9 @@ def test_nested_three_ordered_block_unordered_extra_block_drop_block_headings_ar
    >   ----
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > \n   > ]",
-        "[ulist(1,6):+::7::\n\n  þ\n  \n  \n  \n]",
+        "[ulist(1,6):+::7::\n\n  þ\n  \n  \n  ]",
         "[tbreak(1,8):-::----]",
         "[block-quote(2,8)::> \n   >   > \n   > ]",
         "[para(2,10):\n]",
@@ -1919,9 +1919,9 @@ def test_nested_three_ordered_block_unordered_extra_block_drop_block_headings_ar
         "[text(6,10):header: ]",
         "[end-atx::]",
         "[tbreak(7,8):-::----]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
@@ -1964,9 +1964,9 @@ def test_nested_three_ordered_block_unordered_thematics_around_headings_around_t
    >   ----
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > \n   > ]",
-        "[ulist(1,6):+::7::  \n  \n  \n  \n]",
+        "[ulist(1,6):+::7::  \n  \n  \n  ]",
         "[tbreak(1,8):-::----]",
         "[atx(2,8):1:0:]",
         "[text(2,10):header: ]",
@@ -1978,9 +1978,9 @@ def test_nested_three_ordered_block_unordered_thematics_around_headings_around_t
         "[text(4,10):header: ]",
         "[end-atx::]",
         "[tbreak(5,8):-::----]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
@@ -2020,9 +2020,9 @@ def test_nested_three_ordered_block_unordered_extra_block_drop_block_thematics_a
    >   _____
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > ]",
-        "[ulist(1,6):+::7::\n\n  þ\n  \n  \n]",
+        "[ulist(1,6):+::7::\n\n  þ\n  \n  ]",
         "[tbreak(1,8):_::_____]",
         "[block-quote(2,8)::> \n   >   > \n   > ]",
         "[para(2,10):\n]",
@@ -2034,9 +2034,9 @@ def test_nested_three_ordered_block_unordered_extra_block_drop_block_thematics_a
         "[text(5,8):A code block:]",
         "[end-para:::False]",
         "[tbreak(6,8):_::_____]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
@@ -2079,9 +2079,9 @@ def test_nested_three_ordered_block_unordered_extra_block_drop_block_html_around
    >   -->
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3:]",
+        "[olist(1,1):.:1:3::]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > ]",
-        "[ulist(1,6):+::7::\n\n  þ\n  \n  \n]",
+        "[ulist(1,6):+::7::\n\n  þ\n  \n  ]",
         "[tbreak(1,8):_::_____]",
         "[block-quote(2,8)::> \n   >   > \n   > ]",
         "[para(2,10):\n]",
@@ -2091,9 +2091,9 @@ def test_nested_three_ordered_block_unordered_extra_block_drop_block_html_around
         "[html-block(4,8)]",
         "[text(4,8):<!--\nA code block\n-->:]",
         "[end-html-block:::False]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
         "[end-olist:::True]",
     ]
     expected_gfm = """<ol>
diff --git a/test/nested_three/test_markdown_nested_three_unordered_block_ordered.py b/test/nested_three/test_markdown_nested_three_unordered_block_ordered.py
index be9a4ec3..27d8f832 100644
--- a/test/nested_three/test_markdown_nested_three_unordered_block_ordered.py
+++ b/test/nested_three/test_markdown_nested_three_unordered_block_ordered.py
@@ -1312,7 +1312,7 @@ Some Text
         "[text(1,3):Test List:]",
         "[end-para:::True]",
         "[block-quote(2,3):  :  > \n  > ]",
-        "[olist(2,5):):1:7::]",
+        "[olist(2,5):):1:7:]",
         "[para(2,8):]",
         "[text(2,8):Test1:]",
         "[end-para:::True]",
@@ -1320,9 +1320,9 @@ Some Text
         "[para(3,8):]",
         "[text(3,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[atx(5,1):2:0:]",
         "[text(5,4):Headline 2: ]",
@@ -1367,12 +1367,12 @@ Some Text
 """
 
     expected_tokens = [
-        "[ulist(1,1):-::2::  \n]",
+        "[ulist(1,1):-::2::\n  \n]",
         "[para(1,3):]",
         "[text(1,3):Test List:]",
         "[end-para:::True]",
         "[block-quote(2,3):  :  > \n  > ]",
-        "[olist(2,5):):1:7::]",
+        "[olist(2,5):):1:7:]",
         "[para(2,8):]",
         "[text(2,8):Test1:]",
         "[end-para:::True]",
@@ -1380,9 +1380,9 @@ Some Text
         "[para(3,8):]",
         "[text(3,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
         "[atx(5,3):2:0:]",
         "[text(5,6):Headline 2: ]",
         "[end-atx::]",
@@ -1431,13 +1431,13 @@ Some Text
 """
 
     expected_tokens = [
-        "[ulist(1,1):-::2::\n  \n]",
+        "[ulist(1,1):-::2::\n\n  \n]",
         "[para(1,3):]",
         "[text(1,3):Test List:]",
         "[end-para:::True]",
         "[BLANK(2,1):]",
         "[block-quote(3,3):  :  > \n  > ]",
-        "[olist(3,5):):1:7::]",
+        "[olist(3,5):):1:7:]",
         "[para(3,8):]",
         "[text(3,8):Test1:]",
         "[end-para:::True]",
@@ -1445,9 +1445,9 @@ Some Text
         "[para(4,8):]",
         "[text(4,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
         "[end-olist:::True]",
-        "[end-block-quote:::False]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
         "[para(6,3):]",
         "[text(6,3):this is some text:]",
         "[end-para:::True]",
@@ -1507,7 +1507,7 @@ Some Text
         "[end-para:::True]",
         "[BLANK(2,1):]",
         "[block-quote(3,3):  :  > \n  > ]",
-        "[olist(3,5):):1:7::]",
+        "[olist(3,5):):1:7:]",
         "[para(3,8):]",
         "[text(3,8):Test1:]",
         "[end-para:::True]",
@@ -1515,9 +1515,9 @@ Some Text
         "[para(4,8):]",
         "[text(4,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
         "[end-olist:::True]",
-        "[end-block-quote:::False]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
         "[end-ulist:::True]",
         "[para(6,1):]",
         "[text(6,1):this is some text:]",
@@ -1578,7 +1578,7 @@ def test_nested_three_unordered_block_ordered_with_blank_thematic_x():
         "[end-para:::True]",
         "[BLANK(4,1):]",
         "[block-quote(5,3):  :  > \n  > ]",
-        "[olist(5,5):):1:7::]",
+        "[olist(5,5):):1:7:]",
         "[para(5,8):]",
         "[text(5,8):Test1:]",
         "[end-para:::True]",
@@ -1586,9 +1586,9 @@ def test_nested_three_unordered_block_ordered_with_blank_thematic_x():
         "[para(6,8):]",
         "[text(6,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[tbreak(8,1):-::-----]",
         "[BLANK(9,1):]",
@@ -1632,13 +1632,13 @@ def test_nested_three_unordered_block_ordered_with_blank_thematic_a():
         "[text(1,3):Headline 1: ]",
         "[end-atx::]",
         "[BLANK(2,1):]",
-        "[ulist(3,1):-::2::\n  \n]",
+        "[ulist(3,1):-::2::\n\n  \n]",
         "[para(3,3):]",
         "[text(3,3):Test List:]",
         "[end-para:::True]",
         "[BLANK(4,1):]",
         "[block-quote(5,3):  :  > \n  > ]",
-        "[olist(5,5):):1:7::]",
+        "[olist(5,5):):1:7:]",
         "[para(5,8):]",
         "[text(5,8):Test1:]",
         "[end-para:::True]",
@@ -1646,9 +1646,9 @@ def test_nested_three_unordered_block_ordered_with_blank_thematic_a():
         "[para(6,8):]",
         "[text(6,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
         "[tbreak(8,3):-::-----]",
         "[BLANK(9,1):]",
         "[end-ulist:::True]",
@@ -1693,7 +1693,7 @@ block
         "[text(1,3):Test List:]",
         "[end-para:::True]",
         "[block-quote(2,3):  :  > \n  > ]",
-        "[olist(2,5):):1:7::]",
+        "[olist(2,5):):1:7:]",
         "[para(2,8):]",
         "[text(2,8):Test1:]",
         "[end-para:::True]",
@@ -1701,9 +1701,9 @@ block
         "[para(3,8):]",
         "[text(3,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[fcode-block(5,1):`:3:text:::::]",
         "[text(6,1):block:]",
@@ -1744,12 +1744,12 @@ def test_nested_three_unordered_block_ordered_with_blank_fenced_a():
 """
 
     expected_tokens = [
-        "[ulist(1,1):-::2::  \n  \n  \n]",
+        "[ulist(1,1):-::2::\n  \n  \n  \n]",
         "[para(1,3):]",
         "[text(1,3):Test List:]",
         "[end-para:::True]",
         "[block-quote(2,3):  :  > \n  > ]",
-        "[olist(2,5):):1:7::]",
+        "[olist(2,5):):1:7:]",
         "[para(2,8):]",
         "[text(2,8):Test1:]",
         "[end-para:::True]",
@@ -1757,9 +1757,9 @@ def test_nested_three_unordered_block_ordered_with_blank_fenced_a():
         "[para(3,8):]",
         "[text(3,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
         "[fcode-block(5,3):`:3:text:::::]",
         "[text(6,3):block:]",
         "[end-fcode-block:::3:False]",
@@ -2645,7 +2645,7 @@ def test_nested_three_unordered_block_ordered_with_blank_html_x():
         "[end-para:::True]",
         "[BLANK(4,1):]",
         "[block-quote(5,3):  :  > \n  > ]",
-        "[olist(5,5):):1:7::]",
+        "[olist(5,5):):1:7:]",
         "[para(5,8):]",
         "[text(5,8):Test1:]",
         "[end-para:::True]",
@@ -2653,9 +2653,9 @@ def test_nested_three_unordered_block_ordered_with_blank_html_x():
         "[para(6,8):]",
         "[text(6,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[html-block(8,1)]",
         "[text(8,1):<!-- this is html-->:]",
@@ -2702,13 +2702,13 @@ def test_nested_three_unordered_block_ordered_with_blank_html_a():
         "[text(1,3):Headline 1: ]",
         "[end-atx::]",
         "[BLANK(2,1):]",
-        "[ulist(3,1):-::2::\n  \n]",
+        "[ulist(3,1):-::2::\n\n  \n]",
         "[para(3,3):]",
         "[text(3,3):Test List:]",
         "[end-para:::True]",
         "[BLANK(4,1):]",
         "[block-quote(5,3):  :  > \n  > ]",
-        "[olist(5,5):):1:7::]",
+        "[olist(5,5):):1:7:]",
         "[para(5,8):]",
         "[text(5,8):Test1:]",
         "[end-para:::True]",
@@ -2716,9 +2716,9 @@ def test_nested_three_unordered_block_ordered_with_blank_html_a():
         "[para(6,8):]",
         "[text(6,8):Test2:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
         "[html-block(8,3)]",
         "[text(8,3):<!-- this is html-->:]",
         "[end-html-block:::False]",
diff --git a/test/resources/rules/md012/bad_double_blanks_at_end.md b/test/resources/rules/md012/bad_double_blanks_at_end.md
deleted file mode 100644
index 917f98c0..00000000
--- a/test/resources/rules/md012/bad_double_blanks_at_end.md
+++ /dev/null
@@ -1,2 +0,0 @@
-this is a line
-
diff --git a/test/resources/rules/md012/bad_multiple_blanks_in_block_quote.md b/test/resources/rules/md012/bad_multiple_blanks_in_block_quote.md
deleted file mode 100644
index 96d7fdb1..00000000
--- a/test/resources/rules/md012/bad_multiple_blanks_in_block_quote.md
+++ /dev/null
@@ -1,4 +0,0 @@
-> this is a start
->
->
-> this is an end
diff --git a/test/resources/rules/md012/bad_multiple_blanks_in_html.md b/test/resources/rules/md012/bad_multiple_blanks_in_html.md
deleted file mode 100644
index c61907ed..00000000
--- a/test/resources/rules/md012/bad_multiple_blanks_in_html.md
+++ /dev/null
@@ -1,4 +0,0 @@
-<!--
-
-
--->
diff --git a/test/resources/rules/md012/bad_multiple_blanks_in_list.md b/test/resources/rules/md012/bad_multiple_blanks_in_list.md
deleted file mode 100644
index e6276b33..00000000
--- a/test/resources/rules/md012/bad_multiple_blanks_in_list.md
+++ /dev/null
@@ -1,6 +0,0 @@
-1. fred
-   
-
-   fred2
-1. barney
-1. wilma
diff --git a/test/resources/rules/md012/good_multiple_blanks_in_fenced.md b/test/resources/rules/md012/good_multiple_blanks_in_fenced.md
deleted file mode 100644
index ca8300c9..00000000
--- a/test/resources/rules/md012/good_multiple_blanks_in_fenced.md
+++ /dev/null
@@ -1,6 +0,0 @@
-```Markdown
-this is a line
-
-
-this is another line
-```
diff --git a/test/resources/rules/md012/good_multiple_blanks_in_indented.md b/test/resources/rules/md012/good_multiple_blanks_in_indented.md
deleted file mode 100644
index bd848247..00000000
--- a/test/resources/rules/md012/good_multiple_blanks_in_indented.md
+++ /dev/null
@@ -1,8 +0,0 @@
-this is outside the code block
-
-    this is a line
-
-
-    this is another line
-
-this is outside the code block
diff --git a/test/resources/rules/md012/good_simple_paragraphs_double_blanks.md b/test/resources/rules/md012/good_simple_paragraphs_double_blanks.md
deleted file mode 100644
index 27e1afc5..00000000
--- a/test/resources/rules/md012/good_simple_paragraphs_double_blanks.md
+++ /dev/null
@@ -1,4 +0,0 @@
-this is one line
-
-
-this is another line
diff --git a/test/resources/rules/md012/good_simple_paragraphs_single_blanks.md b/test/resources/rules/md012/good_simple_paragraphs_single_blanks.md
deleted file mode 100644
index bd1aec0c..00000000
--- a/test/resources/rules/md012/good_simple_paragraphs_single_blanks.md
+++ /dev/null
@@ -1,3 +0,0 @@
-this is one line
-
-this is another line
diff --git a/test/resources/rules/md012/good_simple_paragraphs_triple_blanks.md b/test/resources/rules/md012/good_simple_paragraphs_triple_blanks.md
deleted file mode 100644
index 1f9eb53a..00000000
--- a/test/resources/rules/md012/good_simple_paragraphs_triple_blanks.md
+++ /dev/null
@@ -1,5 +0,0 @@
-this is one line
-
-
-
-this is another line
diff --git a/test/rules/test_md004.py b/test/rules/test_md004.py
index 4af25a90..30cfbf24 100644
--- a/test/rules/test_md004.py
+++ b/test/rules/test_md004.py
@@ -286,7 +286,6 @@ this is a separator
     pluginRuleTest(
         "mix_md004_md006",
         is_mix_test=True,
-        use_debug=False,
         enable_rules=__plugin_enable_md006,
         disable_rules=__plugin_disable_md007,
         source_file_contents=""" + first
diff --git a/test/rules/test_md005.py b/test/rules/test_md005.py
index e916c9c0..691df64d 100644
--- a/test/rules/test_md005.py
+++ b/test/rules/test_md005.py
@@ -955,29 +955,6 @@ def test_md005_fix(test: pluginRuleTest) -> None:
     execute_fix_test(test)
 
 
-@pytest.mark.rules
-@pytest.mark.skip
-def test_md005_bad_ordered_right_unordered_fix():
-    """
-    Test to make sure this rule does trigger with a document that
-    is only level 1 unordered lists starting with dash and the
-    configuration is also set to asterisk.
-    """
-
-    # see "bad_ordered_right_unordered_x"
-
-
-@pytest.mark.rules
-@pytest.mark.skip
-def test_md005_bad_unordered_ordered_right_fix():
-    """
-    Test to make sure this rule does trigger with a document that
-    is only level 1 unordered lists starting with dash and the
-    configuration is also set to asterisk.
-    """
-    # see "bad_ordered_right_unordered_x"
-
-
 def test_md005_query_config():
     config_test = pluginQueryConfigTest(
         "md005",
diff --git a/test/rules/test_md007.py b/test/rules/test_md007.py
index ac6ab9ef..46441c1b 100644
--- a/test/rules/test_md007.py
+++ b/test/rules/test_md007.py
@@ -253,7 +253,6 @@ scanTests = [
 >    * this is level 2
 """,
         scan_expected_return_code=1,
-        use_debug=True,
         scan_expected_output=(
             "{temp_source_path}:4:6: MD007: Unordered list indentation [Expected: 2, Actual=3] (ul-indent)"
         ),
@@ -546,7 +545,6 @@ scanTests = [
       next line 3
 """,
         disable_rules="md004",
-        scan_expected_return_code=0,
     ),
     pluginRuleTest(
         "bad_all_indent_with_extra_lines",
@@ -685,7 +683,6 @@ scanTests = [
             "\a", " "
         ),
         disable_rules="md004,md027,md023,md009",
-        scan_expected_return_code=0,
         scan_expected_output="",
     ),
     pluginRuleTest(
diff --git a/test/rules/test_md012.py b/test/rules/test_md012.py
index bddc3b56..ef0f8ff7 100644
--- a/test/rules/test_md012.py
+++ b/test/rules/test_md012.py
@@ -4,7 +4,9 @@ Module to provide tests related to the MD012 rule.
 
 import os
 from test.rules.utils import (
+    calculate_fix_tests,
     execute_configuration_test,
+    execute_fix_test,
     execute_query_configuration_test,
     execute_scan_test,
     id_test_plug_rule_fn,
@@ -30,59 +32,94 @@ The value for property 'plugins.md012.maximum' is not valid: Allowable values ar
 scanTests = [
     pluginRuleTest(
         "good_simple_paragraphs_single_blanks",
-        source_file_name=f"{source_path}good_simple_paragraphs_single_blanks.md",
+        source_file_contents="""this is one line
+
+this is another line
+""",
     ),
     pluginRuleTest(
         "bad_simple_paragraphs_double_blanks",
-        source_file_name=f"{source_path}good_simple_paragraphs_double_blanks.md",
+        source_file_contents="""this is one line
+
+
+this is another line
+""",
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""this is one line
+
+this is another line
+""",
     ),
     pluginRuleTest(
         "good_simple_paragraphs_double_blanks",
-        source_file_name=f"{source_path}good_simple_paragraphs_double_blanks.md",
+        source_file_contents="""this is one line
+
+
+this is another line
+""",
         set_args=["plugins.md012.maximum=$#2"],
     ),
     pluginRuleTest(
-        "good_simple_paragraphs_triple_blanks",
-        source_file_name=f"{source_path}good_simple_paragraphs_triple_blanks.md",
+        "bad_simple_paragraphs_triple_blanks",
+        source_file_contents="""this is one line
+
+
+
+this is another line
+""",
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:4:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 3] (no-multiple-blanks)""",
+        fix_expected_file_contents="""this is one line
+
+this is another line
+""",
     ),
     pluginRuleTest(
         "bad_double_blanks_at_end",
-        source_file_name=f"{source_path}bad_double_blanks_at_end.md",
-        scan_expected_return_code=1,
-        scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
-    ),
-    pluginRuleTest(
-        "bad_multiple_blanks_in_block_quote",
-        source_file_name=f"{source_path}bad_multiple_blanks_in_block_quote.md",
-        scan_expected_return_code=1,
-        scan_expected_output="""{temp_source_path}:3:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
-    ),
-    pluginRuleTest(
-        "bad_multiple_blanks_in_list",
-        source_file_name=f"{source_path}bad_multiple_blanks_in_list.md",
+        source_file_contents="""this is a line
+
+""",
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
-        disable_rules="md009",
+        fix_expected_file_contents="""this is a line
+""",
     ),
     pluginRuleTest(
         "good_multiple_blanks_in_fenced",
-        source_file_name=f"{source_path}good_multiple_blanks_in_fenced.md",
-        scan_expected_return_code=0,
+        source_file_contents="""```Markdown
+this is a line
+
+
+this is another line
+```
+""",
     ),
     pluginRuleTest(
         "good_multiple_blanks_in_indented",
-        source_file_name=f"{source_path}good_multiple_blanks_in_indented.md",
-        scan_expected_return_code=0,
+        source_file_contents="""this is outside the code block
+
+    this is a line
+
+
+    this is another line
+
+this is outside the code block
+""",
     ),
     pluginRuleTest(
         "bad_multiple_blanks_in_html",
-        source_file_name=f"{source_path}bad_multiple_blanks_in_html.md",
+        source_file_contents="""<!--
+
+
+-->
+""",
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""<!--
+
+-->
+""",
     ),
     pluginRuleTest(
         "good_blanks_around_single_pragma",
@@ -92,7 +129,6 @@ scanTests = [
 
 My 10 lines
 """,
-        scan_expected_return_code=0,
     ),
     pluginRuleTest(
         "bad_blanks_double_around_single_pragma",
@@ -107,9 +143,15 @@ My 10 lines
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)
 {temp_source_path}:6:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""Some markdown here
+
+<!--pyml disable-num-lines 5 md013-->
+
+My 10 lines
+""",
     ),
     pluginRuleTest(
-        "bad_blanks_double_within_pragmas",
+        "bad_blanks_double_within_double_pragmas",
         source_file_contents="""Some markdown here
 
 <!--pyml disable-num-lines 5 md013-->
@@ -121,6 +163,510 @@ My 10 lines
 """,
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:5:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""Some markdown here
+
+<!--pyml disable-num-lines 5 md013-->
+
+<!--pyml disable-num-lines 5 md013-->
+
+My 10 lines
+""",
+    ),
+    pluginRuleTest(
+        "bad_blanks_double_around_double_pragmas",
+        source_file_contents="""Some markdown here
+
+
+<!--pyml disable-num-lines 5 md013-->
+
+
+<!--pyml disable-num-lines 5 md013-->
+
+
+My 10 lines
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)
+{temp_source_path}:6:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)
+{temp_source_path}:9:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""Some markdown here
+
+<!--pyml disable-num-lines 5 md013-->
+
+<!--pyml disable-num-lines 5 md013-->
+
+My 10 lines
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_with_double_blanks_at_middle",
+        source_file_contents="""> this is a start
+>
+>
+> this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""> this is a start
+>
+> this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_with_triple_blanks_at_middle",
+        source_file_contents="""> this is a start
+>
+>
+>
+> this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:4:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 3] (no-multiple-blanks)""",
+        fix_expected_file_contents="""> this is a start
+>
+> this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_with_double_blanks_at_start",
+        source_file_contents=""">
+>
+> this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:2:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents=""">
+> this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_with_double_blanks_at_end",
+        source_file_contents="""> this is a start
+>
+>
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""> this is a start
+>
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_with_double_double_blanks",
+        source_file_contents="""> this is a start
+>
+>
+> this is the middle
+>
+>
+> this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)
+{temp_source_path}:6:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""> this is a start
+>
+> this is the middle
+>
+> this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_in_list_with_double_blanks_at_middle",
+        source_file_contents="""1. fred
+
+
+   fred2
+1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""1. fred
+
+   fred2
+1. barney
+""",
+    ),
+    pluginRuleTest(
+        "bad_in_list_with_triple_blanks_at_middle",
+        source_file_contents="""1. fred
+
+
+
+   fred2
+1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:4:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 3] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""1. fred
+
+   fred2
+1. barney
+""",
+    ),
+    pluginRuleTest(  # test_extra_051a1
+        "bad_in_list_with_double_blanks_at_start",
+        source_file_contents="""1.
+
+   fred2
+1. barney
+""",
+        scan_expected_return_code=0,
+        disable_rules="md009",
+    ),
+    pluginRuleTest(  # test_extra_051a0
+        "bad_in_list_with_double_blanks_at_end",
+        source_file_contents="""1. fred
+
+
+1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""1. fred
+
+1. barney
+""",
+    ),
+    pluginRuleTest(
+        "bad_in_list_with_double_double_blanks",
+        source_file_contents="""1. fred
+
+
+   fred2
+
+
+   fred3
+1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)
+{temp_source_path}:6:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""1. fred
+
+   fred2
+
+   fred3
+1. barney
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_block_quote_with_double_blanks_at_middle",
+        source_file_contents="""> > this is a start
+> >
+> >
+> > this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""> > this is a start
+> >
+> > this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_block_quote_with_triple_blanks_at_middle",
+        source_file_contents="""> > this is a start
+> >
+> >
+> >
+> > this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:4:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 3] (no-multiple-blanks)""",
+        fix_expected_file_contents="""> > this is a start
+> >
+> > this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_block_quote_with_double_blanks_at_start",
+        source_file_contents="""> >
+> >
+> > this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:2:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""> >
+> > this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_block_quote_with_double_blanks_at_end",
+        source_file_contents="""> > this is a start
+> >
+> >
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""> > this is a start
+> >
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_block_quote_with_double_double_blanks",
+        source_file_contents="""> > this is a start
+> >
+> >
+> > this is the middle
+> >
+> >
+> > this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)
+{temp_source_path}:6:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""> > this is a start
+> >
+> > this is the middle
+> >
+> > this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_list_with_double_blanks_at_middle",
+        source_file_contents="""+ > this is a start
+  >
+  >
+  > this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""+ > this is a start
+  >
+  > this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_list_with_triple_blanks_at_middle",
+        source_file_contents="""+ > this is a start
+  >
+  >
+  >
+  > this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:4:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 3] (no-multiple-blanks)""",
+        fix_expected_file_contents="""+ > this is a start
+  >
+  > this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_list_with_double_blanks_at_start",
+        source_file_contents="""+ >
+  >
+  > this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:2:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""+ >
+  > this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_list_with_double_blanks_at_end",
+        source_file_contents="""+ > this is a start
+  >
+  >
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""+ > this is a start
+  >
+""",
+    ),
+    pluginRuleTest(
+        "bad_block_quote_in_list_with_double_double_blanks",
+        source_file_contents="""+ > this is a start
+  >
+  >
+  > this is the middle
+  >
+  >
+  > this is an end
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)
+{temp_source_path}:6:4: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        fix_expected_file_contents="""+ > this is a start
+  >
+  > this is the middle
+  >
+  > this is an end
+""",
+    ),
+    pluginRuleTest(
+        "bad_in_list_in_list_with_double_blanks_at_middle",
+        source_file_contents="""+ 1. fred
+
+
+     fred2
++ 1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""+ 1. fred
+
+     fred2
++ 1. barney
+""",
+    ),
+    pluginRuleTest(
+        "bad_in_list_in_list_with_triple_blanks_at_middle",
+        source_file_contents="""+ 1. fred
+
+
+
+     fred2
++ 1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:4:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 3] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""+ 1. fred
+
+     fred2
++ 1. barney
+""",
+    ),
+    pluginRuleTest(  # test_extra_051c0
+        "bad_in_list_in_list_with_double_blanks_at_start",
+        source_file_contents="""+ 1.
+
+     fred2
++ 1. barney
+""",
+        scan_expected_return_code=0,
+        disable_rules="md009",
+    ),
+    pluginRuleTest(
+        "bad_in_list_in_list_with_double_blanks_at_end",
+        source_file_contents="""+ 1. fred
+
+
++ 1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""+ 1. fred
+
++ 1. barney
+""",
+    ),
+    pluginRuleTest(
+        "bad_in_list_in_list_with_double_double_blanks",
+        source_file_contents="""+ 1. fred
+
+
+     fred2
+
+
+     fred3
++ 1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)
+{temp_source_path}:6:1: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""+ 1. fred
+
+     fred2
+
+     fred3
++ 1. barney
+""",
+    ),
+    pluginRuleTest(
+        "bad_in_list_in_block_quote_with_double_blanks_at_middle",
+        source_file_contents="""> 1. fred
+>
+>
+>    fred2
+> 1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        disable_rules="md009",
+        # use_fix_debug=True,
+        fix_expected_file_contents="""> 1. fred
+>
+>    fred2
+> 1. barney
+""",
+    ),
+    pluginRuleTest(  # test_extra_051b0 test_extra_051b1
+        "bad_in_list_in_block_quote_with_triple_blanks_at_middle",
+        source_file_contents="""> 1. fred
+>
+>
+>
+>    fred2
+> 1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:4:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 3] (no-multiple-blanks)""",
+        disable_rules="md009",
+        # use_fix_debug=True,
+        fix_expected_file_contents="""> 1. fred
+>
+>    fred2
+> 1. barney
+""",
+    ),
+    pluginRuleTest(  # test_extra_051a2
+        "bad_in_list_in_block_quote_with_double_blanks_at_start",
+        source_file_contents="""> 1.
+>
+>    fred2
+> 1. barney
+""",
+        scan_expected_return_code=0,
+        disable_rules="md027",
+    ),
+    pluginRuleTest(
+        "bad_in_list_in_block_quote_with_double_blanks_at_end",
+        source_file_contents="""> 1. fred
+>
+>
+> 1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""> 1. fred
+>
+> 1. barney
+""",
+    ),
+    pluginRuleTest(
+        "bad_in_list_in_block_quote_with_double_double_blanks",
+        source_file_contents="""> 1. fred
+>
+>
+>    fred2
+>
+>
+>    fred3
+> 1. barney
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)
+{temp_source_path}:6:2: MD012: Multiple consecutive blank lines [Expected: 1, Actual: 2] (no-multiple-blanks)""",
+        disable_rules="md009",
+        fix_expected_file_contents="""> 1. fred
+>
+>    fred2
+>
+>    fred3
+> 1. barney
+""",
     ),
 ]
 
@@ -133,7 +679,14 @@ def test_md012_scan(test: pluginRuleTest) -> None:
     execute_scan_test(test, "md012")
 
 
-# Fix?
+@pytest.mark.parametrize(
+    "test", calculate_fix_tests(scanTests), ids=id_test_plug_rule_fn
+)
+def test_md012_fix(test: pluginRuleTest) -> None:
+    """
+    Execute a parameterized fix test for plugin md001.
+    """
+    execute_fix_test(test)
 
 
 @pytest.mark.parametrize("test", configTests, ids=id_test_plug_rule_fn)
@@ -142,7 +695,11 @@ def test_md012_config(test: pluginRuleTest) -> None:
     Execute a parameterized fix test for plugin md001.
     """
     execute_configuration_test(
-        test, f"{source_path}good_simple_paragraphs_single_blanks.md"
+        test,
+        file_contents="""this is one line
+
+this is another line
+""",
     )
 
 
diff --git a/test/rules/test_md023.py b/test/rules/test_md023.py
index cf2dc888..292356c3 100644
--- a/test/rules/test_md023.py
+++ b/test/rules/test_md023.py
@@ -247,7 +247,6 @@ Long Heading
         "bad_improper_indent_setext_in_list_item",
         source_file_name=f"{source_path}improper_indent_setext_in_list_item.md",
         enable_rules=plugin_enable_this_rule,
-        use_debug=True,
         disable_rules=__plugin_disable_md005_md030_md032,
         source_file_contents="""- Some text
 
@@ -419,7 +418,6 @@ Long Heading
 """,
         enable_rules=plugin_enable_this_rule,
         disable_rules="md010,md027,md030",
-        use_debug=True,
     ),
     pluginRuleTest(
         "bad_atx_unordered_list_with_tab_second",
@@ -513,7 +511,6 @@ Long Heading
         enable_rules=plugin_enable_this_rule,
         disable_rules="md010,md027",
         scan_expected_return_code=1,
-        use_debug=True,
         scan_expected_output="""{temp_source_path}:2:5: MD023: Headings must start at the beginning of the line. (heading-start-left, header-start-left)
 """,
         fix_expected_file_contents="""+ heading 1
@@ -559,7 +556,6 @@ Long Heading
         enable_rules=plugin_enable_this_rule,
         disable_rules="md010,md027,md022,md024",
         scan_expected_return_code=1,
-        use_debug=True,
         scan_expected_output="""{temp_source_path}:5:5: MD023: Headings must start at the beginning of the line. (heading-start-left, header-start-left)
 """,
         fix_expected_file_contents="""
@@ -599,7 +595,6 @@ Long Heading
     #         enable_rules=plugin_enable_this_rule,
     #         disable_rules="md010,md027,md022,md024",
     #         scan_expected_return_code=1,
-    #         use_debug=True,
     #         scan_expected_output="""{temp_source_path}:5:5: MD023: Headings must start at the beginning of the line. (heading-start-left, header-start-left)
     # """,
     #         fix_expected_file_contents="""
@@ -903,7 +898,6 @@ Long Heading
         ),
         enable_rules=plugin_enable_this_rule,
         disable_rules="md009,md010,md027",
-        # use_debug=True,
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:7:4: MD023: Headings must start at the beginning of the line. (heading-start-left, header-start-left)
 """,
@@ -930,7 +924,6 @@ Long Heading
         ),
         enable_rules=plugin_enable_this_rule,
         disable_rules="md009,md010,md027",
-        use_debug=True,
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:5:4: MD023: Headings must start at the beginning of the line. (heading-start-left, header-start-left)
 """,
@@ -956,7 +949,6 @@ Long Heading
         ),
         enable_rules=plugin_enable_this_rule,
         disable_rules="md009,md010,md027",
-        use_debug=True,
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:6:4: MD023: Headings must start at the beginning of the line. (heading-start-left, header-start-left)
 """,
@@ -984,7 +976,6 @@ Long Heading
         ),
         enable_rules=plugin_enable_this_rule,
         disable_rules="md009,md010,md027",
-        use_debug=True,
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:7:4: MD023: Headings must start at the beginning of the line. (heading-start-left, header-start-left)
 """,
@@ -1020,7 +1011,6 @@ Long Heading
         enable_rules=plugin_enable_this_rule,
         disable_rules="md010,md027,md022,md024",
         scan_expected_return_code=1,
-        use_debug=True,
         scan_expected_output="""{temp_source_path}:5:5: MD023: Headings must start at the beginning of the line. (heading-start-left, header-start-left)
 """,
         fix_expected_file_contents="""
@@ -1190,7 +1180,6 @@ Long Heading
     # """,
     #         enable_rules=plugin_enable_this_rule,
     #         disable_rules="md007,md010,md022,md024,md025,md027,md030",
-    #         use_debug=True,
     #         scan_expected_return_code=1,
     #         scan_expected_output="""{temp_source_path}:3:9: MD023: Headings must start at the beginning of the line. (heading-start-left, header-start-left)
     # """,
diff --git a/test/rules/test_md027.py b/test/rules/test_md027.py
index 76bf6976..0fe9e19a 100644
--- a/test/rules/test_md027.py
+++ b/test/rules/test_md027.py
@@ -278,6 +278,39 @@ scanTests = [
 """,
         fix_expected_file_contents="""> this is text
 
+> within a block quote
+""",
+    ),
+    pluginRuleTest(
+        "bad_single_block_quote_space_top",
+        # disable_rules=__plugin_disable_md028,
+        source_file_contents=""">  this is text
+>
+> within a block quote
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:1:3: MD027: Multiple spaces after blockquote symbol (no-multiple-space-blockquote)
+""",
+        mark_fix_as_skipped=True,
+        fix_expected_file_contents="""> this is text
+
+> within a block quote
+""",
+    ),
+    pluginRuleTest(
+        "bad_single_block_quote_space_bottom",
+        # disable_rules=__plugin_disable_md028,
+        source_file_contents="""> this is text
+>
+>  within a block quote
+""",
+        scan_expected_return_code=1,
+        scan_expected_output="""{temp_source_path}:3:3: MD027: Multiple spaces after blockquote symbol (no-multiple-space-blockquote)
+""",
+        mark_scan_as_skipped=True,
+        mark_fix_as_skipped=True,
+        fix_expected_file_contents="""> this is text
+
 > within a block quote
 """,
     ),
@@ -680,7 +713,6 @@ scanTests = [
 > > --------
 """,
         disable_rules="md007,md009,md012,md030",
-        scan_expected_return_code=0,
         # use_debug=True,
         scan_expected_output="",
     ),
@@ -697,7 +729,6 @@ scanTests = [
 > + another list
 """,
         disable_rules="md007,md009,md012,md030,md031",
-        scan_expected_return_code=0,
         # use_debug=True,
         scan_expected_output="",
     ),
@@ -713,7 +744,6 @@ scanTests = [
 > > > --------
 """,
         disable_rules="md007,md009,md012,md030,md031",
-        scan_expected_return_code=0,
         # use_debug=True,
         scan_expected_output="",
     ),
@@ -723,7 +753,6 @@ scanTests = [
 > > fourth block 1
 """,
         disable_rules="",
-        scan_expected_return_code=0,
         # use_debug=True,
         scan_expected_output="",
     ),
@@ -758,7 +787,6 @@ scanTests = [
 >   > -----
 > + another list""",
         disable_rules="md047,md032",
-        scan_expected_return_code=0,
         scan_expected_output="""""",
     ),
     pluginRuleTest(
@@ -772,7 +800,6 @@ scanTests = [
    >   ----
 """,
         disable_rules="md007,md009,md012,md030,md031",
-        scan_expected_return_code=0,
         scan_expected_output="",
     ),
     pluginRuleTest(
@@ -788,7 +815,6 @@ scanTests = [
 > + another list
 """,
         disable_rules="md007,md009,md012,md030,md031",
-        scan_expected_return_code=0,
         # use_debug=True,
         scan_expected_output="",
     ),
@@ -806,10 +832,21 @@ scanTests = [
 > + another list
 """,
         disable_rules="md007,md009,md012,md030,md031",
-        scan_expected_return_code=0,
         # use_debug=True,
         scan_expected_output="",
     ),
+    pluginRuleTest(  # test_extra_051b2
+        "md012_bad_in_list_in_block_quote_with_double_blanks_at_start",
+        source_file_contents="""> 1.
+>
+>    fred2
+> 1. barney
+""",
+        # disable_rules="md007,md009,md012,md030,md031",
+        # use_debug=True,
+        scan_expected_output="",
+        mark_scan_as_skipped=True,
+    ),
     pluginRuleTest(
         "mix_md027_md007",
         source_file_contents=""">  + first
diff --git a/test/rules/test_md027_leaf.py b/test/rules/test_md027_leaf.py
index 228bb8af..9efcbc69 100644
--- a/test/rules/test_md027_leaf.py
+++ b/test/rules/test_md027_leaf.py
@@ -226,11 +226,23 @@ scanTests = [
     pluginRuleTest(
         "good_block_quote_fenced",
         source_file_name=f"{source_path}good_block_quote_fenced.md",
+        source_file_contents="""> this is text
+> ```code
+> this is a fenced block
+> ```
+> a real test
+""",
         disable_rules=__plugin_disable_md031,
     ),
     pluginRuleTest(
         "good_block_quote_fenced_middle",
         source_file_name=f"{source_path}good_block_quote_fenced_middle.md",
+        source_file_contents="""> this is text
+> ```code
+>  this is a fenced block
+> ```
+> a real test
+""",
         disable_rules=__plugin_disable_md031,
     ),
     pluginRuleTest(
diff --git a/test/rules/test_md031.py b/test/rules/test_md031.py
index 79045e92..8f1030ee 100644
--- a/test/rules/test_md031.py
+++ b/test/rules/test_md031.py
@@ -2471,8 +2471,6 @@ A code block
 {temp_source_path}:6:3: MD031: Fenced code blocks should be surrounded by blank lines (blanks-around-fences)
 """,
         disable_rules="md032",
-        # mark_fix_as_skipped=skip_fix_bad_markdown,
-        # use_fix_debug=True,
         fix_expected_file_contents="""> > + block 3
 > >   block 3
 > > + block 3
@@ -6254,6 +6252,7 @@ another list
 {temp_source_path}:6:7: MD031: Fenced code blocks should be surrounded by blank lines (blanks-around-fences)
 """,
         disable_rules="md032,md027",
+        mark_fix_as_skipped=True,
         fix_expected_file_contents="""> + > -----
 >   > > block 1
 >   > > block 2
@@ -6373,6 +6372,7 @@ another list
 {temp_source_path}:9:7: MD031: Fenced code blocks should be surrounded by blank lines (blanks-around-fences)
 """,
         disable_rules="md032",
+        mark_fix_as_skipped=True,
         fix_expected_file_contents="""> + > -----
 >   > > block 1
 >   > > block 2
@@ -6526,7 +6526,6 @@ another list
 >   > -----
 > + another list
 """,
-        scan_expected_return_code=0,
         scan_expected_output="",
         disable_rules="md032,md027",
     ),
diff --git a/test/rules/test_md035.py b/test/rules/test_md035.py
index f5fbf6cc..a6641caa 100644
--- a/test/rules/test_md035.py
+++ b/test/rules/test_md035.py
@@ -257,7 +257,6 @@ ___
 > >   ______
 """,
         disable_rules="md031,md032",
-        scan_expected_return_code=0,
         scan_expected_output="",
     ),
 ]
diff --git a/test/rules/test_md037.py b/test/rules/test_md037.py
index 3f8a68a4..5e567064 100644
--- a/test/rules/test_md037.py
+++ b/test/rules/test_md037.py
@@ -21,7 +21,6 @@ scanTests = [
     pluginRuleTest(
         "good_valid_emphasis",
         source_file_name=f"{source_path}good_valid_emphasis.md",
-        use_debug=True,
     ),
     pluginRuleTest(
         "bad_surrounding_emphasis",
@@ -121,14 +120,12 @@ this text *is* in italics
         "good_surrounding_emphasis_short_with_mixed",
         source_file_contents="""this * text _ is * in _ italics
 """,
-        scan_expected_return_code=0,
         scan_expected_output="",
     ),
     pluginRuleTest(
         "good_surrounding_emphasis_short_with_other_mixed",
         source_file_contents="""this _ text * is _ in * italics
 """,
-        scan_expected_return_code=0,
         scan_expected_output="",
     ),
     pluginRuleTest(
@@ -274,7 +271,6 @@ this text __ is __ in bold
 ---
 """,
         scan_expected_return_code=1,
-        use_debug=True,
         scan_expected_output="""{temp_source_path}:1:12: MD037: Spaces inside emphasis markers (no-space-in-emphasis)
 {temp_source_path}:1:15: MD037: Spaces inside emphasis markers (no-space-in-emphasis)
 {temp_source_path}:4:12: MD037: Spaces inside emphasis markers (no-space-in-emphasis)
diff --git a/test/rules/test_md044.py b/test/rules/test_md044.py
index 59cbca74..5a3a1987 100644
--- a/test/rules/test_md044.py
+++ b/test/rules/test_md044.py
@@ -355,7 +355,6 @@ is a ParaGraph` contained.
 """,
         set_args=["plugins.md044.names=ParaGraph"],
         use_strict_config=True,
-        use_debug=True,
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:1:4: MD044: Proper names should have the correct capitalization [Expected: ParaGraph; Actual: paragraph] (proper-names)
 {temp_source_path}:1:41: MD044: Proper names should have the correct capitalization [Expected: ParaGraph; Actual: paragraph] (proper-names)
@@ -369,7 +368,6 @@ is a ParaGraph` contained.
 """,
         set_args=["plugins.md044.names=ParaGraph"],
         use_strict_config=True,
-        use_debug=True,
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:1:4: MD044: Proper names should have the correct capitalization [Expected: ParaGraph; Actual: paragraph] (proper-names)
 {temp_source_path}:1:26: MD044: Proper names should have the correct capitalization [Expected: ParaGraph; Actual: paragraph] (proper-names)
@@ -385,7 +383,6 @@ is a ParaGraph` contained.
 """,
         set_args=["plugins.md044.names=ParaGraph"],
         use_strict_config=True,
-        use_debug=True,
         scan_expected_return_code=1,
         scan_expected_output="""{temp_source_path}:1:4: MD044: Proper names should have the correct capitalization [Expected: ParaGraph; Actual: paragraph] (proper-names)
 {temp_source_path}:1:29: MD044: Proper names should have the correct capitalization [Expected: ParaGraph; Actual: paragraph] (proper-names)
@@ -601,7 +598,6 @@ ParaGraph title"
     ),
     pluginRuleTest(
         "bad_collapsed_link",
-        use_debug=True,
         source_file_contents="""this is a
 [collapsed
 paragraph][]
@@ -710,7 +706,6 @@ big ParaGraph title"
     ),
     pluginRuleTest(
         "bad_shortcut_link",
-        use_debug=True,
         source_file_contents="""this is a
 [another
 paragraph]
@@ -737,7 +732,6 @@ ParaGraph]: /url "a ParaGraph title"
     ),
     pluginRuleTest(
         "bad_shortcut_link_no_title",
-        use_debug=True,
         source_file_contents="""this is a
 [another
 paragraph]
@@ -763,7 +757,6 @@ ParaGraph]: /url
     ),
     pluginRuleTest(
         "bad_shortcut_link_backslash",
-        use_debug=True,
         source_file_contents="""this is a
 [paragraph \\! paragraph]
 link
@@ -789,7 +782,6 @@ link
     ),
     pluginRuleTest(
         "bad_shortcut_link_reference",
-        use_debug=True,
         source_file_contents="""this is a
 [paragraph &amp; paragraph]
 link
diff --git a/test/rules/test_plugin_manager.py b/test/rules/test_plugin_manager.py
index 3012550b..1b43aac2 100644
--- a/test/rules/test_plugin_manager.py
+++ b/test/rules/test_plugin_manager.py
@@ -1294,7 +1294,7 @@ def test_markdown_with_plugins_list_only():
   md009   no-trailing-spaces              True       True       0.6.0    Yes
   md010   no-hard-tabs                    True       True       0.6.0    Yes
   md011   no-reversed-links               True       True       0.5.0    No
-  md012   no-multiple-blanks              True       True       0.6.0    No
+  md012   no-multiple-blanks              True       True       0.7.0    Yes
   md013   line-length                     True       True       0.6.0    No
   md014   commands-show-output            True       True       0.5.0    No
   md018   no-missing-space-atx            True       True       0.5.0    No
@@ -1378,7 +1378,7 @@ def test_markdown_with_plugins_list_only_all():
   md009   no-trailing-spaces              True       True       0.6.0    Yes
   md010   no-hard-tabs                    True       True       0.6.0    Yes
   md011   no-reversed-links               True       True       0.5.0    No
-  md012   no-multiple-blanks              True       True       0.6.0    No
+  md012   no-multiple-blanks              True       True       0.7.0    Yes
   md013   line-length                     True       True       0.6.0    No
   md014   commands-show-output            True       True       0.5.0    No
   md018   no-missing-space-atx            True       True       0.5.0    No
diff --git a/test/rules/utils.py b/test/rules/utils.py
index 860db5d1..1ec2b327 100644
--- a/test/rules/utils.py
+++ b/test/rules/utils.py
@@ -51,6 +51,7 @@ class pluginRuleTest:
     is_mix_test: bool = True
     mark_scan_as_skipped: bool = False
     mark_fix_as_skipped: bool = False
+    notes: str = ""
 
 
 def id_test_plug_rule_fn(val: Any) -> str:
diff --git a/test/test_markdown_extra.py b/test/test_markdown_extra.py
index 5095eb63..96196b28 100644
--- a/test/test_markdown_extra.py
+++ b/test/test_markdown_extra.py
@@ -151,13 +151,13 @@ def test_extra_006():
         "[fcode-block(2,3):`:3:block:::::]",
         "[text(3,3):A code block:]",
         "[end-fcode-block:::3:False]",
-        "[olist(5,3):.:1:5::]",
+        "[olist(5,3):.:1:5:]",
         "[para(5,6):]",
         "[text(5,6):another list:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -434,15 +434,15 @@ def test_extra_008x():
         "[para(2,7):]",
         "[text(2,7):this is level 2:]",
         "[end-para:::True]",
-        "[ulist(3,7):*::8:    :]",
+        "[ulist(3,7):*::8:    ]",
         "[para(3,9):]",
         "[text(3,9):this is level 3:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-ulist:::True]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -1057,7 +1057,7 @@ def test_extra_014x():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n\n]",
+        "[olist(1,3):.:1:5::   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1066,10 +1066,10 @@ def test_extra_014x():
         "[para(4,6):]",
         "[text(4,6):that:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
-        "[BLANK(6,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1100,7 +1100,7 @@ def test_extra_014a():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n\n]",
+        "[olist(1,3):.:1:5::   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1109,10 +1109,10 @@ def test_extra_014a():
         "[para(4,6):]",
         "[text(4,6):that:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
-        "[BLANK(6,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1144,7 +1144,7 @@ def test_extra_014bx():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n   \n\n]",
+        "[olist(1,3):.:1:5::   \n   \n   ]",
         "[tbreak(1,6):*::*****]",
         "[para(2,6):\n]",
         "[text(2,6):list\nthis::\n]",
@@ -1154,10 +1154,10 @@ def test_extra_014bx():
         "[para(5,6):]",
         "[text(5,6):that:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1273,7 +1273,7 @@ def test_extra_015():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n\n]",
+        "[olist(1,3):.:1:5::   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1284,10 +1284,10 @@ def test_extra_015():
         "[para(4,6):]",
         "[text(4,6):that:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
-        "[BLANK(6,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1318,7 +1318,7 @@ def test_extra_015a():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n\n]",
+        "[olist(1,3):.:1:5::   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1329,10 +1329,10 @@ def test_extra_015a():
         "[para(4,6):]",
         "[text(4,6):that:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
-        "[BLANK(6,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1364,7 +1364,7 @@ def test_extra_016():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n>\n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n\n   \n   \n]",
+        "[olist(1,3):.:1:5::   \n\n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -1376,9 +1376,9 @@ def test_extra_016():
         "[para(6,6):]",
         "[text(6,6):that:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1414,7 +1414,7 @@ def test_extra_016a():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n>\n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n\n   \n   \n\n]",
+        "[olist(1,3):.:1:5::   \n\n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -1426,10 +1426,10 @@ def test_extra_016a():
         "[para(6,6):]",
         "[text(6,6):that:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
-        "[BLANK(8,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1464,7 +1464,7 @@ def test_extra_017():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n>\n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n\n   \n   \n]",
+        "[olist(1,3):.:1:5::   \n\n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -1476,9 +1476,9 @@ def test_extra_017():
         "[para(6,6):]",
         "[text(6,6):that:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1518,7 +1518,7 @@ def test_extra_018x():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n   \n   \n]",
+        "[olist(1,3):.:1:5::   \n   \n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1529,9 +1529,9 @@ def test_extra_018x():
         "[para(6,6):]",
         "[text(6,6):that:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1564,7 +1564,7 @@ def test_extra_018a():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n   \n   \n]",
+        "[olist(1,3):.:1:5::   \n   \n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1575,9 +1575,9 @@ def test_extra_018a():
         "[para(6,6):]",
         "[text(6,6):that:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1610,7 +1610,7 @@ def test_extra_018b():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n   \n   \n]",
+        "[olist(1,3):.:1:5::   \n   \n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1621,9 +1621,9 @@ def test_extra_018b():
         "[para(6,6):]",
         "[text(6,6):that:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1656,7 +1656,7 @@ def test_extra_018c():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n   \n   \n]",
+        "[olist(1,3):.:1:5::   \n   \n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1667,9 +1667,9 @@ def test_extra_018c():
         "[para(6,6):]",
         "[text(6,6):that:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1702,7 +1702,7 @@ def test_extra_019x():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n]",
+        "[olist(1,3):.:1:5::   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1713,9 +1713,9 @@ def test_extra_019x():
         "[para(4,6):]",
         "[text(4,6):that:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1745,7 +1745,7 @@ def test_extra_019a():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n]",
+        "[olist(1,3):.:1:5::   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1756,9 +1756,9 @@ def test_extra_019a():
         "[para(4,6):]",
         "[text(4,6):that:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1789,7 +1789,7 @@ def test_extra_019b():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n   \n   \n]",
+        "[olist(1,3):.:1:5::   \n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::False]",
@@ -1800,9 +1800,9 @@ def test_extra_019b():
         "[para(5,6):]",
         "[text(5,6):that:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1834,7 +1834,7 @@ def test_extra_020x():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n>\n> \n> \n]",
-        "[olist(1,3):.:1:5::   \n\n   \n]",
+        "[olist(1,3):.:1:5::   \n\n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -1844,9 +1844,9 @@ def test_extra_020x():
         "[para(5,6):]",
         "[text(5,6):that:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1880,7 +1880,7 @@ def test_extra_020a():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n>\n> \n> \n> \n]",
-        "[olist(1,3):.:1:5::   \n\n   \n   \n]",
+        "[olist(1,3):.:1:5::   \n\n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -1890,9 +1890,9 @@ def test_extra_020a():
         "[para(6,6):]",
         "[text(6,6):that:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1927,7 +1927,7 @@ def test_extra_020b():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n>\n> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n\n   \n   \n   \n]",
+        "[olist(1,3):.:1:5::   \n\n   \n   \n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -1937,9 +1937,9 @@ def test_extra_020b():
         "[para(7,6):]",
         "[text(7,6):that:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -1972,7 +1972,7 @@ def test_extra_020c():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n]",
-        "[olist(1,3):.:1:5::   \n\n   \n]",
+        "[olist(1,3):.:1:5::   \n\n   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -1982,9 +1982,9 @@ def test_extra_020c():
         "[para(5,6):]",
         "[text(5,6):that:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -2017,7 +2017,7 @@ def test_extra_020d():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> ]",
-        "[olist(1,3):.:1:5::   \n\n   \n]",
+        "[olist(1,3):.:1:5::   \n\n   ]",
         "[para(1,6):\n\n\n]",
         "[text(1,6):list\nthis\n\u00a0\n[abc]: /url::\n\n\n]",
         "[end-para:::True]",
@@ -2025,9 +2025,9 @@ def test_extra_020d():
         "[para(5,6):]",
         "[text(5,6):that:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -2150,7 +2150,7 @@ def test_extra_021b():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,4):+::5: :   \n]",
+        "[ulist(1,4):+::5: :   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -2158,9 +2158,9 @@ def test_extra_021b():
         "[para(3,5):]",
         "[text(3,5):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2201,15 +2201,15 @@ def test_extra_021c():
         "[para(4,8):]",
         "[text(4,8):this is level 2:]",
         "[end-para:::True]",
-        "[ulist(5,8):*::9:     :]",
+        "[ulist(5,8):*::9:     ]",
         "[para(5,10):]",
         "[text(5,10):this is level 3:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-ulist:::True]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<p>This is a test</p>
 <blockquote>
@@ -2557,7 +2557,7 @@ def test_extra_024x():
         "[para(4,5):]",
         "[text(4,5):Item 2:]",
         "[end-para:::True]",
-        "[ulist(5,6):*::7:   :]",
+        "[ulist(5,6):*::7:   ]",
         "[para(5,8):]",
         "[text(5,8):Item 2a:]",
         "[end-para:::True]",
@@ -2565,10 +2565,10 @@ def test_extra_024x():
         "[para(6,8):]",
         "[text(6,8):Item 2b:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2624,7 +2624,7 @@ def test_extra_024a():
         "[para(4,6):]",
         "[text(4,6):Item 2:]",
         "[end-para:::True]",
-        "[ulist(5,6):*::7:   :]",
+        "[ulist(5,6):*::7:   ]",
         "[para(5,8):]",
         "[text(5,8):Item 2a:]",
         "[end-para:::True]",
@@ -2632,10 +2632,10 @@ def test_extra_024a():
         "[para(6,8):]",
         "[text(6,8):Item 2b:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2673,7 +2673,7 @@ def test_extra_025xx():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n\n\n]",
+        "[ulist(1,3):+::4::  \n\n]",
         "[para(1,5):\n]",
         "[text(1,5):list\nthis::\n]",
         "[end-para:::True]",
@@ -2686,9 +2686,9 @@ def test_extra_025xx():
         "[para(5,5):]",
         "[text(5,5):that:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2722,7 +2722,7 @@ def test_extra_025xa():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n\n\n  \u00fe\n]",
+        "[ulist(1,3):+::4::  \n\n\n  þ]",
         "[para(1,5):\n]",
         "[text(1,5):list\nthis::\n]",
         "[end-para:::True]",
@@ -2731,9 +2731,9 @@ def test_extra_025xa():
         "[text(3,8):good\nitem\nthat::\n\n]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2767,7 +2767,7 @@ def test_extra_025ax():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n\n\n]",
+        "[ulist(1,3):+::4::  \n\n]",
         "[para(1,5):\n]",
         "[text(1,5):list\nthis::\n]",
         "[end-para:::True]",
@@ -2780,9 +2780,9 @@ def test_extra_025ax():
         "[para(5,5):]",
         "[text(5,5):that:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2816,7 +2816,7 @@ def test_extra_025aa():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n\n\n  þ\n]",
+        "[ulist(1,3):+::4::  \n\n\n  þ]",
         "[para(1,5):\n]",
         "[text(1,5):list\nthis::\n]",
         "[end-para:::True]",
@@ -2825,9 +2825,9 @@ def test_extra_025aa():
         "[text(3,7):good\nitem\nthat::\n\n]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2860,7 +2860,7 @@ def test_extra_025bx():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n\n]",
+        "[ulist(1,3):+::4::  \n]",
         "[para(1,5):\n]",
         "[text(1,5):list\nthis::\n]",
         "[end-para:::True]",
@@ -2873,9 +2873,9 @@ def test_extra_025bx():
         "[para(4,5):]",
         "[text(4,5):that:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2907,7 +2907,7 @@ def test_extra_025ba():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n\n  þ\n]",
+        "[ulist(1,3):+::4::  \n\n  þ]",
         "[para(1,5):\n]",
         "[text(1,5):list\nthis::\n]",
         "[end-para:::True]",
@@ -2916,9 +2916,9 @@ def test_extra_025ba():
         "[text(3,7):item\nthat::\n]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(5,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2950,7 +2950,7 @@ def test_extra_025cxx():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n]",
+        "[ulist(1,3):+::4::\n]",
         "[para(1,5):]",
         "[text(1,5):list:]",
         "[end-para:::True]",
@@ -2963,9 +2963,9 @@ def test_extra_025cxx():
         "[para(4,5):]",
         "[text(4,5):that:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -2997,7 +2997,7 @@ def test_extra_025cxb():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[olist(1,3):.:1:5::\n\n]",
+        "[olist(1,3):.:1:5::\n]",
         "[para(1,6):]",
         "[text(1,6):list:]",
         "[end-para:::True]",
@@ -3010,9 +3010,9 @@ def test_extra_025cxb():
         "[para(4,6):]",
         "[text(4,6):that:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -3043,7 +3043,7 @@ def test_extra_025cxc():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[olist(1,3):.:1:5::\n]",
+        "[olist(1,3):.:1:5::]",
         "[para(1,6):]",
         "[text(1,6):list:]",
         "[end-para:::True]",
@@ -3056,9 +3056,9 @@ def test_extra_025cxc():
         "[para(3,6):]",
         "[text(3,6):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -3087,7 +3087,7 @@ def test_extra_025cxd():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[olist(1,3):.:1:5::]",
+        "[olist(1,3):.:1:5:]",
         "[para(1,6):]",
         "[text(1,6):list:]",
         "[end-para:::True]",
@@ -3095,9 +3095,9 @@ def test_extra_025cxd():
         "[para(2,6):]",
         "[text(2,6):that:]",
         "[end-para:::True]",
-        "[BLANK(3,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(3,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -3122,7 +3122,7 @@ def test_extra_025cxe():
 """
     expected_tokens = [
         "[block-quote(1,1)::> ]",
-        "[olist(1,3):.:1:5::]",
+        "[olist(1,3):.:1:5:]",
         "[block-quote(1,6)::> \n> ]",
         "[para(1,8):]",
         "[text(1,8):list:]",
@@ -3132,9 +3132,9 @@ def test_extra_025cxe():
         "[para(2,6):]",
         "[text(2,6):that:]",
         "[end-para:::True]",
-        "[BLANK(3,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(3,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -3164,7 +3164,7 @@ def test_extra_025cxf():
 """
     expected_tokens = [
         "[block-quote(1,1)::> ]",
-        "[olist(1,3):.:1:5::\n]",
+        "[olist(1,3):.:1:5::]",
         "[block-quote(1,6)::> \n>    > \n> ]",
         "[para(1,8):\n]",
         "[text(1,8):list\nis::\n]",
@@ -3174,9 +3174,9 @@ def test_extra_025cxf():
         "[para(3,6):]",
         "[text(3,6):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-olist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ol>
@@ -3207,7 +3207,7 @@ def test_extra_025cxg():
 """
     expected_tokens = [
         "[block-quote(1,1)::> ]",
-        "[ulist(1,3):+::4::\n]",
+        "[ulist(1,3):+::4::]",
         "[block-quote(1,5)::> \n>   > \n> ]",
         "[para(1,7):\n]",
         "[text(1,7):list\nis::\n]",
@@ -3217,9 +3217,9 @@ def test_extra_025cxg():
         "[para(3,5):]",
         "[text(3,5):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -3292,7 +3292,7 @@ def test_extra_025ca():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
-        "[ulist(1,3):+::4::\n\n  þ\n]",
+        "[ulist(1,3):+::4::\n\n  þ]",
         "[para(1,5):]",
         "[text(1,5):list:]",
         "[end-para:::True]",
@@ -3301,9 +3301,9 @@ def test_extra_025ca():
         "[text(2,7):good\nitem\nthat::\n\n]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(5,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6114,7 +6114,7 @@ def test_extra_044jeb():
     expected_tokens = [
         "[block-quote(1,1)::> \n> ]",
         "[ulist(1,3):+::4:]",
-        "[ulist(1,5):+::6:  :\n\n\n\n\n]",
+        "[ulist(1,5):+::6:  :\n\n\n\n]",
         "[block-quote(1,7)::> \n>     > \n>     > \n>     > \n>     > ]",
         "[tbreak(1,9):-::-----]",
         "[para(2,9):\n\n]",
@@ -6128,10 +6128,10 @@ def test_extra_044jeb():
         "[text(6,9):more:]",
         "[end-para:::True]",
         "[end-block-quote:::True]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6187,16 +6187,16 @@ def test_extra_044jec():
         "[text(2,11):block\nabc\nun-block::\n\n]",
         "[end-para:::False]",
         "[tbreak(5,11):_::_____]",
-        "[ulist(6,7):+::8::]",
+        "[ulist(6,7):+::8:]",
         "[para(6,11):]",
         "[text(6,11):more:]",
         "[end-para:::True]",
-        "[BLANK(7,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
         "[end-block-quote:::True]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(7,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6272,7 +6272,7 @@ def test_extra_044mcxx():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::5::  \n]",
+        "[ulist(1,3):+::5::  ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -6280,9 +6280,9 @@ def test_extra_044mcxx():
         "[para(3,5):]",
         "[text(3,5):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6342,7 +6342,7 @@ def test_extra_044mca():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n]",
+        "[ulist(1,3):+::4::  ]",
         "[para(1,5):\n]",
         "[text(1,5):list\nthis::\n]",
         "[end-para:::True]",
@@ -6350,9 +6350,9 @@ def test_extra_044mca():
         "[para(3,5):]",
         "[text(3,5):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6379,7 +6379,7 @@ def test_extra_044mcb():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::5::   \n]",
+        "[ulist(1,3):+::5::   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -6387,9 +6387,9 @@ def test_extra_044mcb():
         "[para(3,6):]",
         "[text(3,6):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6416,7 +6416,7 @@ def test_extra_044mcc():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::5::\n]",
+        "[ulist(1,3):+::5::]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -6424,9 +6424,9 @@ def test_extra_044mcc():
         "[para(3,5):]",
         "[text(3,5):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6453,7 +6453,7 @@ def test_extra_044mcd():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::5:: \n]",
+        "[ulist(1,3):+::5:: ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -6461,9 +6461,9 @@ def test_extra_044mcd():
         "[para(3,5):]",
         "[text(3,5):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6490,7 +6490,7 @@ def test_extra_044mce():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> ]",
-        "[ulist(1,3):+::5::   \n]",
+        "[ulist(1,3):+::5::   ]",
         "[para(1,6):\n]",
         "[text(1,6):list\nthis::\n]",
         "[end-para:::True]",
@@ -6498,9 +6498,9 @@ def test_extra_044mce():
         "[para(3,5):]",
         "[text(3,5):that:]",
         "[end-para:::True]",
-        "[BLANK(4,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(4,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6533,7 +6533,7 @@ def test_extra_046a():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  \n  \n  \n  ]",
         "[setext(3,5):-:6::(1,5)]",
         "[text(1,5):list 1\nlist 2::\n]",
         "[end-setext::]",
@@ -6545,9 +6545,9 @@ def test_extra_046a():
         "[para(8,5):]",
         "[text(8,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6642,7 +6642,7 @@ def test_extra_046l0():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  ]",
         "[para(1,5):]",
         "[text(1,5):list:]",
         "[end-para:::False]",
@@ -6653,9 +6653,9 @@ def test_extra_046l0():
         "[para(5,5):]",
         "[text(5,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(6,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(6,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -6689,7 +6689,7 @@ def test_extra_046l1():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n>\n> \n> \n> \n>\n> ]",
-        "[ulist(1,3):+::4::\n  \n  \n  \n\n]",
+        "[ulist(1,3):+::4::\n  \n  \n  \n]",
         "[para(1,5):]",
         "[text(1,5):list:]",
         "[end-para:::True]",
@@ -6702,9 +6702,9 @@ def test_extra_046l1():
         "[para(7,5):]",
         "[text(7,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(8,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(8,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -8736,7 +8736,7 @@ def test_extra_049l7():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  ]",
         "[block-quote(1,5)::> \n>   > \n>   > \n>   > \n> ]",
         "[tbreak(1,7):-::-----]",
         "[ulist(2,7):+::8::  \n  ]",
@@ -8757,9 +8757,9 @@ def test_extra_049l7():
         "[para(9,5):]",
         "[text(9,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(10,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(10,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -8985,7 +8985,7 @@ block 2</p>
 </ul>"""
 
     # Act & Assert
-    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=True)
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
 
 
 @pytest.mark.gfm
@@ -9535,7 +9535,7 @@ def test_extra_050d0():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n  \n]",
+        "[ulist(1,3):+::4::  \n  \n  ]",
         "[ulist(1,5):+::6:  :\n\n  þ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>     > \n>     > \n> ]",
@@ -9552,9 +9552,9 @@ def test_extra_050d0():
         "[para(8,5):]",
         "[text(8,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(9,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(9,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -9601,7 +9601,7 @@ def test_extra_050d1():
 """
     expected_tokens = [
         "[block-quote(1,1)::> \n> \n> \n> \n> \n>\n> \n> ]",
-        "[ulist(1,3):+::4::  \n  \n\n  \n]",
+        "[ulist(1,3):+::4::  \n  \n\n  ]",
         "[ulist(1,5):+::6:  :\n\n\n  ]",
         "[tbreak(1,7):-::-----]",
         "[block-quote(2,7)::>     > \n>     > \n>]",
@@ -9620,9 +9620,9 @@ def test_extra_050d1():
         "[para(10,5):]",
         "[text(10,5):another list:]",
         "[end-para:::True]",
-        "[BLANK(11,1):]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(11,1):]",
     ]
     expected_gfm = """<blockquote>
 <ul>
@@ -9854,11 +9854,11 @@ def test_extra_050f1():
    ----
 """
     expected_tokens = [
-        "[olist(1,1):.:1:3::   \n   \n   \n\n   \n]",
+        "[olist(1,1):.:1:3::\n   \n   \n   \n\n   \n]",
         "[block-quote(1,4):   :   > \n   > \n   > \n   > ]",
         "[ulist(1,6):+::7:]",
         "[tbreak(1,8):-::----]",
-        "[ulist(2,8):+::9:  :    \n]",
+        "[ulist(2,8):+::9:  :    ]",
         "[para(2,10):\n]",
         "[text(2,10):list 1\nlist 2::\n]",
         "[end-para:::True]",
@@ -9866,10 +9866,10 @@ def test_extra_050f1():
         "[para(4,10):]",
         "[text(4,10):list 3:]",
         "[end-para:::True]",
-        "[BLANK(5,1):]",
         "[end-ulist:::True]",
         "[end-ulist:::True]",
         "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
         "[fcode-block(6,4):`:3:block:::::]",
         "[text(7,4):A code block:]",
         "[end-fcode-block:::3:False]",
@@ -10118,6 +10118,1847 @@ block 3</li>
     act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=True)
 
 
+@pytest.mark.gfm
+def test_extra_051a0():
+    """
+    TBD
+    bad_in_list_with_double_blanks_at_end
+    """
+
+    # Arrange
+    source_markdown = """1. fred
+
+
+1. barney
+"""
+    expected_tokens = [
+        "[olist(1,1):.:1:3::\n\n]",
+        "[para(1,4):]",
+        "[text(1,4):fred:]",
+        "[end-para:::True]",
+        "[BLANK(2,1):]",
+        "[BLANK(3,1):]",
+        "[li(4,1):3::1]",
+        "[para(4,4):]",
+        "[text(4,4):barney:]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+        "[end-olist:::True]",
+    ]
+    expected_gfm = """<ol>
+<li>
+<p>fred</p>
+</li>
+<li>
+<p>barney</p>
+</li>
+</ol>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051a1():
+    """
+    TBD
+    bad_in_list_with_double_blanks_at_start
+    """
+
+    # Arrange
+    source_markdown = """1.
+
+   fred2
+1. barney
+"""
+    expected_tokens = [
+        "[olist(1,1):.:1:3:]",
+        "[BLANK(1,3):]",
+        "[end-olist:::True]",
+        "[BLANK(2,1):]",
+        "[para(3,4):   ]",
+        "[text(3,4):fred2:]",
+        "[end-para:::True]",
+        "[olist(4,1):.:1:3::]",
+        "[para(4,4):]",
+        "[text(4,4):barney:]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+        "[end-olist:::True]",
+    ]
+    expected_gfm = """<ol>
+<li></li>
+</ol>
+<p>fred2</p>
+<ol>
+<li>barney</li>
+</ol>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051a2():
+    """
+    TBD
+    bad_in_list_in_block_quote_with_double_blanks_at_start
+    """
+
+    # Arrange
+    source_markdown = """> 1.
+>
+>    fred2
+> 1. barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> \n>\n> \n> ]",
+        "[olist(1,3):.:1:5:]",
+        "[BLANK(1,5):]",
+        "[end-olist:::True]",
+        "[BLANK(2,2):]",
+        "[para(3,6):   ]",
+        "[text(3,6):fred2:]",
+        "[end-para:::True]",
+        "[olist(4,3):.:1:5:]",
+        "[para(4,6):]",
+        "[text(4,6):barney:]",
+        "[end-para:::True]",
+        "[end-olist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ol>
+<li></li>
+</ol>
+<p>fred2</p>
+<ol>
+<li>barney</li>
+</ol>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051b0():
+    """
+    TBD
+    bad_in_list_in_block_quote_with_triple_blanks_at_middle
+    """
+
+    # Arrange
+    source_markdown = """> 1. fred
+>
+>
+>
+>    fred2
+> 1. barney"""
+    expected_tokens = [
+        "[block-quote(1,1)::> \n>\n>\n>\n> \n> ]",
+        "[olist(1,3):.:1:5::\n\n\n   ]",
+        "[para(1,6):]",
+        "[text(1,6):fred:]",
+        "[end-para:::True]",
+        "[BLANK(2,2):]",
+        "[BLANK(3,2):]",
+        "[BLANK(4,2):]",
+        "[para(5,6):]",
+        "[text(5,6):fred2:]",
+        "[end-para:::True]",
+        "[li(6,3):5::1]",
+        "[para(6,6):]",
+        "[text(6,6):barney:]",
+        "[end-para:::True]",
+        "[end-olist:::True]",
+        "[end-block-quote:::True]",
+    ]
+    expected_gfm = """<blockquote>
+<ol>
+<li>
+<p>fred</p>
+<p>fred2</p>
+</li>
+<li>
+<p>barney</p>
+</li>
+</ol>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051b1():
+    """
+    TBD
+    bad_in_list_in_block_quote_with_triple_blanks_at_middle
+    """
+
+    # Arrange
+    source_markdown = """> 1. fred
+>
+>    fred2
+> 1. barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> \n>\n> \n> ]",
+        "[olist(1,3):.:1:5::\n   ]",
+        "[para(1,6):]",
+        "[text(1,6):fred:]",
+        "[end-para:::True]",
+        "[BLANK(2,2):]",
+        "[para(3,6):]",
+        "[text(3,6):fred2:]",
+        "[end-para:::True]",
+        "[li(4,3):5::1]",
+        "[para(4,6):]",
+        "[text(4,6):barney:]",
+        "[end-para:::True]",
+        "[end-olist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ol>
+<li>
+<p>fred</p>
+<p>fred2</p>
+</li>
+<li>
+<p>barney</p>
+</li>
+</ol>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051b2():
+    """
+    TBD
+    md012_bad_in_list_in_block_quote_with_double_blanks_at_start
+    """
+
+    # Arrange
+    source_markdown = """> 1.
+>
+>    fred2
+> 1. barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> \n>\n> \n> ]",
+        "[olist(1,3):.:1:5:]",
+        "[BLANK(1,5):]",
+        "[end-olist:::True]",
+        "[BLANK(2,2):]",
+        "[para(3,6):   ]",
+        "[text(3,6):fred2:]",
+        "[end-para:::True]",
+        "[olist(4,3):.:1:5:]",
+        "[para(4,6):]",
+        "[text(4,6):barney:]",
+        "[end-para:::True]",
+        "[end-olist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ol>
+<li></li>
+</ol>
+<p>fred2</p>
+<ol>
+<li>barney</li>
+</ol>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c0x():
+    """
+    TBD
+    bad_in_list_in_list_with_double_blanks_at_start
+    """
+
+    # Arrange
+    source_markdown = """+ 1.
+
+     fred2
++ 1. barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2::\n  ]",
+        "[olist(1,3):.:1:5:  ]",
+        "[BLANK(1,5):]",
+        "[end-olist:::True]",
+        "[BLANK(2,1):]",
+        "[para(3,6):   ]",
+        "[text(3,6):fred2:]",
+        "[end-para:::True]",
+        "[li(4,1):2::]",
+        "[olist(4,3):.:1:5:  :]",
+        "[para(4,6):]",
+        "[text(4,6):barney:]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+        "[end-olist:::True]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<ol>
+<li></li>
+</ol>
+<p>fred2</p>
+</li>
+<li>
+<ol>
+<li>barney</li>
+</ol>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c0a():
+    """
+    TBD
+    bad_in_list_in_list_with_double_blanks_at_start
+    """
+
+    # Arrange
+    source_markdown = """+ 1. abc
+
+     fred2
++ 1. barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2:]",
+        "[olist(1,3):.:1:5:  :\n     ]",
+        "[para(1,6):]",
+        "[text(1,6):abc:]",
+        "[end-para:::True]",
+        "[BLANK(2,1):]",
+        "[para(3,6):]",
+        "[text(3,6):fred2:]",
+        "[end-para:::True]",
+        "[end-olist:::True]",
+        "[li(4,1):2::]",
+        "[olist(4,3):.:1:5:  :]",
+        "[para(4,6):]",
+        "[text(4,6):barney:]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+        "[end-olist:::True]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<ol>
+<li>
+<p>abc</p>
+<p>fred2</p>
+</li>
+</ol>
+</li>
+<li>
+<ol>
+<li>barney</li>
+</ol>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c1x():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ +
+
+    fred2
++ + barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2::\n  ]",
+        "[ulist(1,3):+::4:  ]",
+        "[BLANK(1,4):]",
+        "[end-ulist:::True]",
+        "[BLANK(2,1):]",
+        "[para(3,5):  ]",
+        "[text(3,5):fred2:]",
+        "[end-para:::True]",
+        "[li(4,1):2::]",
+        "[ulist(4,3):+::4:  :]",
+        "[para(4,5):]",
+        "[text(4,5):barney:]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<ul>
+<li></li>
+</ul>
+<p>fred2</p>
+</li>
+<li>
+<ul>
+<li>barney</li>
+</ul>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c1a():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ + abc
+
+    fred2
++ + barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2:]",
+        "[ulist(1,3):+::4:  :\n    ]",
+        "[para(1,5):]",
+        "[text(1,5):abc:]",
+        "[end-para:::True]",
+        "[BLANK(2,1):]",
+        "[para(3,5):]",
+        "[text(3,5):fred2:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[li(4,1):2::]",
+        "[ulist(4,3):+::4:  :]",
+        "[para(4,5):]",
+        "[text(4,5):barney:]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<ul>
+<li>
+<p>abc</p>
+<p>fred2</p>
+</li>
+</ul>
+</li>
+<li>
+<ul>
+<li>barney</li>
+</ul>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c2():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> +
+>
+>   fred2
+> + barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> \n>\n> \n> ]",
+        "[ulist(1,3):+::4:]",
+        "[BLANK(1,4):]",
+        "[end-ulist:::True]",
+        "[BLANK(2,2):]",
+        "[para(3,5):  ]",
+        "[text(3,5):fred2:]",
+        "[end-para:::True]",
+        "[ulist(4,3):+::4:]",
+        "[para(4,5):]",
+        "[text(4,5):barney:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ul>
+<li></li>
+</ul>
+<p>fred2</p>
+<ul>
+<li>barney</li>
+</ul>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c3x():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> +
+
+>   fred2
+> + barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> ]",
+        "[ulist(1,3):+::4:]",
+        "[BLANK(1,4):]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::> \n> ]",
+        "[para(3,5):  ]",
+        "[text(3,5):fred2:]",
+        "[end-para:::True]",
+        "[ulist(4,3):+::4:]",
+        "[para(4,5):]",
+        "[text(4,5):barney:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ul>
+<li></li>
+</ul>
+</blockquote>
+<blockquote>
+<p>fred2</p>
+<ul>
+<li>barney</li>
+</ul>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c3a():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> + abc
+
+>   fred2
+> + barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> ]",
+        "[ulist(1,3):+::4:]",
+        "[para(1,5):]",
+        "[text(1,5):abc:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::> \n> ]",
+        "[para(3,5):  ]",
+        "[text(3,5):fred2:]",
+        "[end-para:::True]",
+        "[ulist(4,3):+::4:]",
+        "[para(4,5):]",
+        "[text(4,5):barney:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ul>
+<li>abc</li>
+</ul>
+</blockquote>
+<blockquote>
+<p>fred2</p>
+<ul>
+<li>barney</li>
+</ul>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c4x():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> abc
+
+> fred2
+> barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> \n]",
+        "[para(1,3):]",
+        "[text(1,3):abc:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::> \n> \n]",
+        "[para(3,3):\n]",
+        "[text(3,3):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<p>abc</p>
+</blockquote>
+<blockquote>
+<p>fred2
+barney</p>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c4a():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """>
+
+> fred2
+> barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::>\n]",
+        "[BLANK(1,2):]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::> \n> \n]",
+        "[para(3,3):\n]",
+        "[text(3,3):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+</blockquote>
+<blockquote>
+<p>fred2
+barney</p>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c5x():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ abc
+
+  fred2
+  barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2::\n  \n  \n]",
+        "[para(1,3):]",
+        "[text(1,3):abc:]",
+        "[end-para:::True]",
+        "[BLANK(2,1):]",
+        "[para(3,3):\n]",
+        "[text(3,3):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<p>abc</p>
+<p>fred2
+barney</p>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c5a():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+
+
+  fred2
+  barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2:]",
+        "[BLANK(1,2):]",
+        "[end-ulist:::True]",
+        "[BLANK(2,1):]",
+        "[para(3,3):  \n  ]",
+        "[text(3,3):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<ul>
+<li></li>
+</ul>
+<p>fred2
+barney</p>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c6x():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ >
+
+  > fred2
++ > barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2::\n\n\n]",
+        "[block-quote(1,3):  :  >\n]",
+        "[BLANK(1,4):]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,3):  :  > ]",
+        "[para(3,5):]",
+        "[text(3,5):fred2:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[li(4,1):2::]",
+        "[block-quote(4,3):  :  > \n]",
+        "[para(4,5):]",
+        "[text(4,5):barney:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<blockquote>
+</blockquote>
+<blockquote>
+<p>fred2</p>
+</blockquote>
+</li>
+<li>
+<blockquote>
+<p>barney</p>
+</blockquote>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c6a():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ > abc
+
+  > fred2
++ > barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2::\n\n\n]",
+        "[block-quote(1,3):  :  > \n]",
+        "[para(1,5):]",
+        "[text(1,5):abc:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,3):  :  > ]",
+        "[para(3,5):]",
+        "[text(3,5):fred2:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[li(4,1):2::]",
+        "[block-quote(4,3):  :  > \n]",
+        "[para(4,5):]",
+        "[text(4,5):barney:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<blockquote>
+<p>abc</p>
+</blockquote>
+<blockquote>
+<p>fred2</p>
+</blockquote>
+</li>
+<li>
+<blockquote>
+<p>barney</p>
+</blockquote>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c7x():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> >
+
+> > fred2
+> > barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::]",
+        "[block-quote(1,3)::> >\n]",
+        "[BLANK(1,4):]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::]",
+        "[block-quote(3,3)::> > \n> > \n]",
+        "[para(3,5):\n]",
+        "[text(3,5):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<blockquote>
+</blockquote>
+</blockquote>
+<blockquote>
+<blockquote>
+<p>fred2
+barney</p>
+</blockquote>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c7a():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> > abc
+
+> > fred2
+> > barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::]",
+        "[block-quote(1,3)::> > \n]",
+        "[para(1,5):]",
+        "[text(1,5):abc:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::]",
+        "[block-quote(3,3)::> > \n> > \n]",
+        "[para(3,5):\n]",
+        "[text(3,5):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<blockquote>
+<p>abc</p>
+</blockquote>
+</blockquote>
+<blockquote>
+<blockquote>
+<p>fred2
+barney</p>
+</blockquote>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c8x():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> > >
+
+> > > fred2
+> > > barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::]",
+        "[block-quote(1,3)::]",
+        "[block-quote(1,5)::> > >\n]",
+        "[BLANK(1,6):]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::]",
+        "[block-quote(3,3)::]",
+        "[block-quote(3,5)::> > > \n> > > \n]",
+        "[para(3,7):\n]",
+        "[text(3,7):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<blockquote>
+<blockquote>
+</blockquote>
+</blockquote>
+</blockquote>
+<blockquote>
+<blockquote>
+<blockquote>
+<p>fred2
+barney</p>
+</blockquote>
+</blockquote>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c8a():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> > > abc
+
+> > > fred2
+> > > barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::]",
+        "[block-quote(1,3)::]",
+        "[block-quote(1,5)::> > > \n]",
+        "[para(1,7):]",
+        "[text(1,7):abc:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::]",
+        "[block-quote(3,3)::]",
+        "[block-quote(3,5)::> > > \n> > > \n]",
+        "[para(3,7):\n]",
+        "[text(3,7):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<blockquote>
+<blockquote>
+<p>abc</p>
+</blockquote>
+</blockquote>
+</blockquote>
+<blockquote>
+<blockquote>
+<blockquote>
+<p>fred2
+barney</p>
+</blockquote>
+</blockquote>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c9x():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ > >
+
+  > > fred2
++ > > barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2::\n\n\n]",
+        "[block-quote(1,3):  :]",
+        "[block-quote(1,5):  :  > >\n]",
+        "[BLANK(1,6):]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,3):  :]",
+        "[block-quote(3,5):  :  > > ]",
+        "[para(3,7):]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[li(4,1):2::]",
+        "[block-quote(4,3):  :]",
+        "[block-quote(4,5):  :  > > \n]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<blockquote>
+<blockquote>
+</blockquote>
+</blockquote>
+<blockquote>
+<blockquote>
+<p>fred2</p>
+</blockquote>
+</blockquote>
+</li>
+<li>
+<blockquote>
+<blockquote>
+<p>barney</p>
+</blockquote>
+</blockquote>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051c9a():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ > > abc
+
+  > > fred2
++ > > barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2::\n\n\n]",
+        "[block-quote(1,3):  :]",
+        "[block-quote(1,5):  :  > > \n]",
+        "[para(1,7):]",
+        "[text(1,7):abc:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,3):  :]",
+        "[block-quote(3,5):  :  > > ]",
+        "[para(3,7):]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[li(4,1):2::]",
+        "[block-quote(4,3):  :]",
+        "[block-quote(4,5):  :  > > \n]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<blockquote>
+<blockquote>
+<p>abc</p>
+</blockquote>
+</blockquote>
+<blockquote>
+<blockquote>
+<p>fred2</p>
+</blockquote>
+</blockquote>
+</li>
+<li>
+<blockquote>
+<blockquote>
+<p>barney</p>
+</blockquote>
+</blockquote>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051cax():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ + >
+
+    > fred2
+  + > barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2:]",
+        "[ulist(1,3):+::4:  :\n\n\n]",
+        "[block-quote(1,5):    :    >\n]",
+        "[BLANK(1,6):]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,5):    :    > ]",
+        "[para(3,7):]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[li(4,3):4:  :]",
+        "[block-quote(4,5):    :    > \n]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<ul>
+<li>
+<blockquote>
+</blockquote>
+<blockquote>
+<p>fred2</p>
+</blockquote>
+</li>
+<li>
+<blockquote>
+<p>barney</p>
+</blockquote>
+</li>
+</ul>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051caa():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ + > abc
+
+    > fred2
+  + > barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2:]",
+        "[ulist(1,3):+::4:  :\n\n\n]",
+        "[block-quote(1,5):    :    > \n]",
+        "[para(1,7):]",
+        "[text(1,7):abc:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,5):    :    > ]",
+        "[para(3,7):]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[li(4,3):4:  :]",
+        "[block-quote(4,5):    :    > \n]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<ul>
+<li>
+<blockquote>
+<p>abc</p>
+</blockquote>
+<blockquote>
+<p>fred2</p>
+</blockquote>
+</li>
+<li>
+<blockquote>
+<p>barney</p>
+</blockquote>
+</li>
+</ul>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+@pytest.mark.skip
+def test_extra_051cbx():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> + >
+
+>   > fred2
+> + > barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> ]",
+        "[ulist(1,3):+::4:]",
+        "[block-quote(1,5)::>\n]",
+        "[BLANK(1,6):]",
+        "[end-block-quote:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::> ]",
+        "[block-quote(3,5)::>   > \n> + > \n]",
+        "[para(3,7):\n]",
+        "[text(3,7):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ul>
+<li>
+<blockquote>
+</blockquote>
+</li>
+</ul>
+</blockquote>
+<blockquote>
+<blockquote>
+<p>fred2</p>
+</blockquote>
+<ul>
+<li>
+<blockquote>
+<p>barney</p>
+</blockquote>
+</li>
+</ul>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+@pytest.mark.skip
+def test_extra_051cba():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> + > abc
+
+>   > fred2
+> + > barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> ]",
+        "[ulist(1,3):+::4:]",
+        "[block-quote(1,5)::> \n]",
+        "[para(1,7):]",
+        "[text(1,7):abc:]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::> ]",
+        "[block-quote(3,5)::>   > \n> + > \n]",
+        "[para(3,7):\n]",
+        "[text(3,7):fred2\nbarney::\n]",
+        "[end-para:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ul>
+<li>
+<blockquote>
+<p>abc</p>
+</blockquote>
+</li>
+</ul>
+</blockquote>
+<blockquote>
+<blockquote>
+<p>fred2</p>
+</blockquote>
+<ul>
+<li>
+<blockquote>
+<p>barney</p>
+</blockquote>
+</li>
+</ul>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051ccx():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> > +
+
+> >   fred2
+> > + barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::]",
+        "[block-quote(1,3)::> > ]",
+        "[ulist(1,5):+::6:]",
+        "[BLANK(1,6):]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::]",
+        "[block-quote(3,3)::> > \n> > ]",
+        "[para(3,7):  ]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[ulist(4,5):+::6:]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<blockquote>
+<ul>
+<li></li>
+</ul>
+</blockquote>
+</blockquote>
+<blockquote>
+<blockquote>
+<p>fred2</p>
+<ul>
+<li>barney</li>
+</ul>
+</blockquote>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051cca():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> > + abc
+
+> >   fred2
+> > + barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::]",
+        "[block-quote(1,3)::> > ]",
+        "[ulist(1,5):+::6:]",
+        "[para(1,7):]",
+        "[text(1,7):abc:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::]",
+        "[block-quote(3,3)::> > \n> > ]",
+        "[para(3,7):  ]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[ulist(4,5):+::6:]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<blockquote>
+<ul>
+<li>abc</li>
+</ul>
+</blockquote>
+</blockquote>
+<blockquote>
+<blockquote>
+<p>fred2</p>
+<ul>
+<li>barney</li>
+</ul>
+</blockquote>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051cdx():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ > +
+
+  >   fred2
+  > + barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2::\n\n]",
+        "[block-quote(1,3):  :  > ]",
+        "[ulist(1,5):+::6:]",
+        "[BLANK(1,6):]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,3):  :  > \n  > ]",
+        "[para(3,7):  ]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[ulist(4,5):+::6:]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<blockquote>
+<ul>
+<li></li>
+</ul>
+</blockquote>
+<blockquote>
+<p>fred2</p>
+<ul>
+<li>barney</li>
+</ul>
+</blockquote>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051cda():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ > + abc
+
+  >   fred2
+  > + barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2::\n\n]",
+        "[block-quote(1,3):  :  > ]",
+        "[ulist(1,5):+::6:]",
+        "[para(1,7):]",
+        "[text(1,7):abc:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,3):  :  > \n  > ]",
+        "[para(3,7):  ]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[ulist(4,5):+::6:]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<blockquote>
+<ul>
+<li>abc</li>
+</ul>
+</blockquote>
+<blockquote>
+<p>fred2</p>
+<ul>
+<li>barney</li>
+</ul>
+</blockquote>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051cex():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ + +
+
+      fred2
+    + barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2:]",
+        "[ulist(1,3):+::4:  :\n    ]",
+        "[ulist(1,5):+::6:    ]",
+        "[BLANK(1,6):]",
+        "[end-ulist:::True]",
+        "[BLANK(2,1):]",
+        "[para(3,7):  ]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[ulist(4,5):+::6:    :]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<ul>
+<li>
+<ul>
+<li></li>
+</ul>
+<p>fred2</p>
+<ul>
+<li>barney</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051cea():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """+ + + abc
+
+      fred2
+    + barney
+"""
+    expected_tokens = [
+        "[ulist(1,1):+::2:]",
+        "[ulist(1,3):+::4:  ]",
+        "[ulist(1,5):+::6:    :\n      \n]",
+        "[para(1,7):]",
+        "[text(1,7):abc:]",
+        "[end-para:::True]",
+        "[BLANK(2,1):]",
+        "[para(3,7):]",
+        "[text(3,7):fred2:]",
+        "[end-para:::True]",
+        "[li(4,5):6:    :]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[BLANK(5,1):]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+    ]
+    expected_gfm = """<ul>
+<li>
+<ul>
+<li>
+<ul>
+<li>
+<p>abc</p>
+<p>fred2</p>
+</li>
+<li>
+<p>barney</p>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051cfx():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> + +
+
+>     fred2
+>   + barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> ]",
+        "[ulist(1,3):+::4:]",
+        "[ulist(1,5):+::6:  ]",
+        "[BLANK(1,6):]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::> \n> ]",
+        "[icode-block(3,7):    :]",
+        "[text(3,7):fred2:]",
+        "[end-icode-block:::True]",
+        "[ulist(4,5):+::6:  ]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ul>
+<li>
+<ul>
+<li></li>
+</ul>
+</li>
+</ul>
+</blockquote>
+<blockquote>
+<pre><code>fred2
+</code></pre>
+<ul>
+<li>barney</li>
+</ul>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
+@pytest.mark.gfm
+def test_extra_051cfa():
+    """
+    TBD
+    """
+
+    # Arrange
+    source_markdown = """> + + abc
+
+>     fred2
+>   + barney
+"""
+    expected_tokens = [
+        "[block-quote(1,1)::> ]",
+        "[ulist(1,3):+::4:]",
+        "[ulist(1,5):+::6:  ]",
+        "[para(1,7):]",
+        "[text(1,7):abc:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(2,1):]",
+        "[block-quote(3,1)::> \n> ]",
+        "[icode-block(3,7):    :]",
+        "[text(3,7):fred2:]",
+        "[end-icode-block:::True]",
+        "[ulist(4,5):+::6:  ]",
+        "[para(4,7):]",
+        "[text(4,7):barney:]",
+        "[end-para:::True]",
+        "[end-ulist:::True]",
+        "[end-block-quote:::True]",
+        "[BLANK(5,1):]",
+    ]
+    expected_gfm = """<blockquote>
+<ul>
+<li>
+<ul>
+<li>abc</li>
+</ul>
+</li>
+</ul>
+</blockquote>
+<blockquote>
+<pre><code>fred2
+</code></pre>
+<ul>
+<li>barney</li>
+</ul>
+</blockquote>"""
+
+    # Act & Assert
+    act_and_assert(source_markdown, expected_gfm, expected_tokens, show_debug=False)
+
+
 @pytest.mark.gfm
 def test_extra_999():
     """