Closed jackdewinter closed 1 month ago
This pull request addresses several issues related to the MD031 rule (blanks around fences) in the PyMarkdown project. The changes include fixes for handling deeply nested containers, improvements in list and block quote processing, and updates to test cases. Additionally, there are minor changes to API documentation and some refactoring.
classDiagram
class RuleMd031 {
- List<List<PendingContainerAdjustment>> __container_adjustments
- int __fix_count
- Optional<MarkdownToken> __removed_container_stack_token
- Optional<List<PendingContainerAdjustment>> __removed_container_adjustments
- LeadingSpaceIndexTracker __leading_space_index_tracker
+ starting_new_file() void
+ __fix_spacing_special_case(PluginScanContext, MarkdownToken) void
+ __fix_spacing_block_quote(MarkdownToken) void
+ __fix_spacing_list_special(PluginScanContext, int, int) void
+ __fix_spacing_list_detect_special(MarkdownToken) Tuple<bool, int, int>
+ __fix_spacing_list(PluginScanContext, MarkdownToken) bool
+ __fix_spacing_list_remove_list(PluginScanContext) void
+ __fix_spacing(PluginScanContext, MarkdownToken, bool) void
+ __process_pending_container_end_adjustment(PluginScanContext, MarkdownToken) void
+ __process_pending_container_end_tokens(PluginScanContext, MarkdownToken) void
+ __calculate_special_case(PluginScanContext, MarkdownToken) void
+ next_token(PluginScanContext, MarkdownToken) void
}
classDiagram
class PyMarkdownApi {
- bool __inherit_logging
- int __log_level
- bool __enable_stack_trace
+ PyMarkdownApi(bool inherit_logging)
+ application_version() str
+ interface_version() int
+ enable_stack_trace() PyMarkdownApi
+ log_debug_and_above() PyMarkdownApi
+ log_info_and_above() PyMarkdownApi
+ log_warning_and_above() PyMarkdownApi
+ log_error_and_above() PyMarkdownApi
+ log_critical_and_above() PyMarkdownApi
+ log(str log_level) PyMarkdownApi
+ log_to_file(str log_file_path) PyMarkdownApi
}
Change | Details | Files |
---|---|---|
Improved handling of deeply nested containers for MD031 rule |
|
pymarkdown/plugins/rule_md031.py |
Updated and added test cases for MD031 rule |
|
test/rules/test_md031.py test/test_markdown_extra.py |
Improved API documentation and minor refactoring |
|
pymarkdown/api.py pymarkdown/file_scan_helper.py |
Updated project metadata and documentation |
|
publish/coverage.json publish/test-results.json newdocs/src/changelog.md test/api/test_api_scan.py |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.99%. Comparing base (
c689274
) to head (29fc3dd
). 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 #1166 closes #1167 closes #1168
Summary by Sourcery
Fix MD031 rule issues by improving handling of fenced code blocks in nested containers, enhance list and block quote spacing logic, and update documentation and tests accordingly.
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores: