Closed jackdewinter closed 1 month ago
This pull request addresses issues #1162 and #1163 by making several changes to the PyMarkdown project, primarily focusing on improving the handling of block quotes, lists, and fenced code blocks within Markdown parsing. The changes include modifications to test cases, adjustments to the MD031 rule (fenced code blocks should be surrounded by blank lines), and updates to various helper functions and processors.
Change | Details | Files |
---|---|---|
Added new test cases for block quotes and fenced code blocks |
|
test/test_markdown_extra.py |
Modified the MD031 rule implementation to improve handling of fenced code blocks in complex structures |
|
pymarkdown/plugins/rule_md_031.py |
Enhanced block quote processing to handle edge cases |
|
pymarkdown/block_quotes/block_quote_non_fenced_helper.py pymarkdown/tokens/block_quote_markdown_token.py |
Updated test utilities and configurations |
|
test/rules/utils.py test/rules/test_md027.py test/rules/test_md031.py |
Minor adjustments and code cleanup |
|
pymarkdown/block_quotes/block_quote_processor.py publish/test-results.json publish/coverage.json |
Attention: Patch coverage is 93.87755%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 99.90%. Comparing base (
11d4ff7
) to head (aa9423c
). Report is 1 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
pymarkdown/plugins/rule_md_031.py | 88.88% | 2 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closes #1162 closes #1163
Summary by Sourcery
Add new test cases for complex markdown scenarios involving nested lists and block quotes with fenced code blocks. Refactor and enhance the handling of spacing in lists and block quotes in the markdown processing logic. Update test configurations and reports to accommodate these changes.
New Features:
test_markdown_extra.py
to handle complex nested list and block quote scenarios with fenced code blocks.Enhancements:
rule_md_031.py
to improve the handling of spacing in lists and block quotes, including the introduction of helper methods for better code organization.block_quote_non_fenced_helper.py
to include additional logic for handling specific block quote scenarios.Tests:
test_md031.py
andtest_md027.py
to cover edge cases related to fenced code blocks within block quotes and lists.Chores: