Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://github.com/jackdewinter/pymarkdown/issues/1132 #1133

Closed
wants to merge 15 commits into from

Conversation

jackdewinter
Copy link
Owner

@jackdewinter jackdewinter commented Jul 8, 2024

closes #1132 1132

Summary by Sourcery

This pull request addresses several issues related to the handling of nested lists and block quotes, particularly focusing on blank lines and list looseness. It includes bug fixes, enhancements to parsing logic, updates to the changelog, and additional test cases to ensure robustness.

  • Bug Fixes:
    • Fixed false positives for list looseness in nested lists and block quotes.
    • Corrected handling of blank lines in nested block quotes and lists to prevent incorrect parsing.
  • Enhancements:
    • Improved handling of leading spaces in block quotes and lists to ensure proper parsing.
    • Enhanced the logic for adjusting block quote leading spaces to handle blank lines more effectively.
  • Documentation:
    • Updated changelog to include fixes for issues related to list looseness and blank lines in nested structures.
  • Tests:
    • Added multiple test cases to verify correct handling of nested lists and block quotes with blank lines and fenced code blocks.
    • Marked some tests as skipped to focus on specific scenarios related to nested structures.
  • Chores:
    • Updated pylint suppression file to account for new arguments and local variables in block quote handling functions.

Copy link
Contributor

sourcery-ai bot commented Jul 8, 2024

Reviewer's Guide by Sourcery

This pull request addresses issue #1132 by adding new test cases and making several modifications to the codebase to handle edge cases in Markdown parsing, particularly around block quotes and lists. The changes include adding new test cases, modifying existing ones, and updating the core logic to handle specific scenarios more accurately.

File-Level Changes

Files Changes
test/test_markdown_extra.py
test/nested_three/test_markdown_nested_three_unordered_block_ordered.py
test/rules/test_md031.py
Added and updated test cases to handle various nested block quote and list scenarios, ensuring accurate Markdown parsing.
pymarkdown/block_quotes/block_quote_non_fenced_helper.py
pymarkdown/transform_markdown/transform_containers.py
pymarkdown/transform_gfm/transform_to_gfm_list_looseness.py
Updated core logic to handle edge cases in block quotes and lists, improving the accuracy of Markdown parsing.
publish/test-results.json
newdocs/src/changelog.md
publish/coverage.json
publish/pylint_suppression.json
Updated documentation, test results, coverage metrics, and pylint suppressions to reflect the new changes.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5d2b0c8) to head (e55e9a0).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1133   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          190       190           
  Lines        19986     20007   +21     
  Branches      2517      2523    +6     
=========================================
+ Hits         19986     20007   +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Occasional false negatives for list looseness
1 participant