Closed jackdewinter closed 3 weeks ago
This pull request addresses multiple issues related to handling nested block quotes, lists, and fenced code blocks in Markdown parsing. The changes primarily affect the test suite, adding numerous new test cases to cover various edge cases and scenarios. The main implementation changes are in the container_helper.py file, modifying how nested block quotes and lists are processed.
classDiagram
class TestMarkdownNestedThreeBlockUnorderedBlock {
+test_nested_three_block_unordered_block_fenced_empty_with_thematics()
+test_nested_three_block_unordered_block_fenced_empty_with_blanks_with_thematics()
+test_nested_three_block_unordered_block_fenced_with_thematics()
+test_nested_three_block_unordered_block_fenced_with_blanks_with_thematics()
+test_nested_three_block_unordered_block_fenced_with_text_before_with_thematics()
+test_nested_three_block_unordered_block_fenced_with_blanks_with_text_before_with_thematics()
+test_nested_three_block_unordered_block_fenced_with_text_after_with_thematics()
+test_nested_three_block_unordered_block_fenced_with_blanks_with_text_after_with_thematics()
+test_nested_three_block_unordered_block_fenced_multiline_with_thematics()
+test_nested_three_block_unordered_block_thematics_around_text_lines()
+test_nested_three_block_unordered_block_thematics_around_blanks_around_text_lines()
+test_nested_three_block_unordered_block_thematics_around_text_lines_with_text_after()
+test_nested_three_block_unordered_nl_block_drop_block_thematics_around_fenced_code_block()
+test_nested_three_block_unordered_nl_block_drop_block_thematics_around_blanks_around_fenced_code_block()
+test_nested_three_block_unordered_block_extra_list__li_drop_list_thematics_around_fenced_code_block()
+test_nested_three_block_unordered_block_extra_list__li_drop_list_thematics_around_blanks_around_fenced_code_block()
+test_nested_three_block_unordered_block_extra_block_single_line_drop_block_thematics_around_fenced_code_block()
+test_nested_three_block_unordered_block_extra_block_drop_block_thematics_around_fenced_code_block()
+test_nested_three_block_unordered_block_extra_block_drop_block_thematics_around_blanks_around_fenced_code_block()
+test_nested_three_block_unordered_block_extra_block_drop_block_with_fenced_code_block()
+test_nested_three_block_unordered_block_extra_block_drop_block_with_blanks_around_fenced_code_block()
+test_nested_three_block_unordered_block_extra_block_with_extra_single_indent_drop_block_with_fenced_code_block()
+test_nested_three_block_unordered_block_extra_block_with_extra_double_indent_drop_block_with_fenced_code_block()
+test_nested_three_block_unordered_block_extra_block_with_extra_triple_indent_drop_block_with_fenced_code_block()
+test_nested_three_block_unordered_block_extra_block_drop_block_extra_block_drop_block_fenced()
+test_nested_three_block_unordered_block_extra_block_drop_block_extra_block_drop_block_blanks_around_fenced()
+test_nested_three_block_unordered_nl_block_drop_block_with_fenced()
+test_nested_three_block_unordered_nl_block_drop_block_with_blanks_around_fenced()
+test_nested_three_block_unordered_block_thematics_around_text_and_fenced()
+test_nested_three_block_unordered_block_thematics_around_text_and_blanks_around_fenced()
+test_nested_three_block_unordered_block_thematic_drop_block_and_list_with_text()
+test_nested_three_block_unordered_block_thematic_nl_text_drop_block_and_list_with_text()
+test_nested_three_block_unordered_block_thematic_nl_fenced_with_drop_block_li()
+test_nested_three_block_unordered_block_fenced_with_drop_right_after()
+test_nested_three_block_unordered_block_empty_fenced_with_drop_right_after()
+test_nested_three_block_unordered_block_thematics_around_blanks_around_text_drop_block_li_li_extra_block_drop_block_li()
+test_nested_three_block_unordered_block_thematics_around_blank_drop_block_li_text()
+test_nested_three_block_unordered_block_thematics_around_blank_drop_block_li_extra_block_text()
+test_nested_three_block_unordered_nl_block_drop_block_headings_around_fenced()
+test_nested_three_block_unordered_nl_block_drop_block_blank_thematics_around_fenced()
+test_nested_three_block_unordered_extra_block_with_no_space_after_drop_block_thematics_around_fenced()
+test_nested_three_block_unordered_extra_block_drop_block_thematic_extra_block_drop_block_thematics_around_fenced()
+test_nested_three_block_unordered_extra_list_drop_list_thematics_around_fenced()
}
class TestMarkdownNestedThreeOrderedBlockUnordered {
+test_nested_three_ordered_block_unordered_nl_extra_block_drop_block_fenced()
+test_nested_three_ordered_block_unordered_nl_extra_block_drop_block_blanks_around_fenced()
+test_nested_three_ordered_block_unordered_thematics_around_fenced()
+test_nested_three_ordered_block_unordered_extra_block_drop_block_with_headings_around_fenced()
+test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_fenced()
+test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_blanks_around_fenced()
+test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_thematics_around_fenced()
+test_nested_three_ordered_block_unordered_extra_list_li_drop_list_with_thematics_around_blanks_around_fenced()
+test_nested_three_ordered_block_unordered_li_with_empty_prefix_extra_block_drop_block_headings_around_text()
+test_nested_three_ordered_block_unordered_extra_block_drop_block_headings_around_text()
+test_nested_three_ordered_block_unordered_thematics_around_headings_around_text()
+test_nested_three_ordered_block_unordered_extra_block_drop_block_thematics_around_text()
+test_nested_three_ordered_block_unordered_extra_block_drop_block_html_around_text()
}
Change | Details | Files |
---|---|---|
Added new test cases for nested block quotes, lists, and fenced code blocks |
|
test/rules/test_md031.py test/nested_three/test_markdown_nested_three_block_unordered_block.py test/nested_three/test_markdown_nested_three_block_unordered_unordered.py test/nested_three/test_markdown_nested_three_block_block_unordered.py |
Modified container block processing logic |
|
pymarkdown/container_blocks/container_helper.py |
Updated code coverage metrics |
|
publish/coverage.json |
Issue | Objective | Addressed | Explanation |
---|---|---|---|
#1233 | Add more tests to cover cases of Nested Containers and multi-level drops | ✅ | |
#1233 | Ensure proper handling of nested containers and multi-level drops by both the parser and rule Md031 | ✅ | |
#1234 | Fix parsing issues for multiple-drops showing incorrect parsing | ✅ | |
#1234 | Add new test cases for multiple-drops scenarios | ✅ | |
#1235 | Fix asserts while scanning multiple drops in containers | ✅ |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
3335836
) to head (ec34bc6
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
closes #1233 closes #1234 closes #1235
Summary by Sourcery
Fix block quote handling in container reduction and add comprehensive tests for nested structures with fenced code blocks.
Bug Fixes:
Tests: