rumdl 0.0.122__tar.gz → 0.0.123__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rumdl might be problematic. Click here for more details.
- {rumdl-0.0.122 → rumdl-0.0.123}/CHANGELOG.md +26 -1
- {rumdl-0.0.122 → rumdl-0.0.123}/Cargo.lock +19 -19
- {rumdl-0.0.122 → rumdl-0.0.123}/Cargo.toml +1 -1
- {rumdl-0.0.122 → rumdl-0.0.123}/PKG-INFO +1 -1
- {rumdl-0.0.122 → rumdl-0.0.123}/src/main.rs +41 -6
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rule.rs +16 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md013_line_length.rs +189 -88
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md033_no_inline_html.rs +4 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md052_reference_links_images.rs +1 -17
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md054_link_image_style.rs +4 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/kramdown_utils.rs +1 -1
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/regex_cache.rs +44 -1
- rumdl-0.0.123/src/utils/text_reflow.rs +1066 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md013_test.rs +24 -126
- rumdl-0.0.123/tests/unfixable_rules_test.rs +161 -0
- rumdl-0.0.122/src/utils/text_reflow.rs +0 -520
- {rumdl-0.0.122 → rumdl-0.0.123}/.config/nextest.toml +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/.mise.toml +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/.pre-commit-config.yaml +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/.rumdl.toml +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/.rustfmt.toml +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/LICENSE +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/MANIFEST.in +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/Makefile +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/README.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/assets/logo.png +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benches/fix_performance.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benches/range_performance.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benches/range_utils_benchmark.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benches/rule_performance.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benches/simple_fix_bench.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benchmark/bin/bench_lint_context.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benchmark/bin/benchmark.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benchmark/bin/benchmark_rule.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benchmark/bin/file_parallel_benchmark.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/benchmark/bin/measure_code_span_performance.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/RULES.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/global-settings.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md001.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md002.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md003.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md004.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md005.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md006.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md007.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md009.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md010.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md011.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md012.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md013.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md014.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md018.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md019.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md020.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md021.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md022.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md023.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md024.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md025.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md026.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md027.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md028.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md029.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md030.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md031.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md032.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md033.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md034.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md035.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md036.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md037.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md038.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md039.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md040.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md041.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md042.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md043.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md044.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md045.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md046.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md047.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md048.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md049.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md050.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md051.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md052.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md053.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md054.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md055.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md056.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md057.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/md058.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/docs/vscode-extension.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/parity_check.py +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/pyproject.toml +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/python/MANIFEST.in +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/python/PYTHON-README.md +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/python/rumdl/__init__.py +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/python/rumdl/__main__.py +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/python/rumdl/py.typed +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/rumdl.toml.example +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/rust-toolchain.toml +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/scripts/extract-changelog.sh +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/scripts/generate-downloads-table.sh +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/scripts/pre-release.sh +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/scripts/prepare-release.sh +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/scripts/setup-pre-commit.sh +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/scripts/update-pre-commit-docs.sh +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/exit_codes.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/inline_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/lib.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/lint_context.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/lsp/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/lsp/server.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/lsp/types.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/markdownlint_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/azure.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/concise.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/github.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/gitlab.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/grouped.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/json.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/json_lines.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/junit.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/pylint.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/sarif.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/formatters/text.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/output/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/parallel.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/performance.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/profiling.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/python.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rule_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rule_config_serde.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/blockquote_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/code_block_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/code_fence_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/emphasis_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/front_matter_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/heading_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/list_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md001_heading_increment.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md002_first_heading_h1/md002_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md002_first_heading_h1.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md003_heading_style/md003_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md003_heading_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md004_unordered_list_style/md004_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md004_unordered_list_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md005_list_indent.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md006_start_bullets.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md007_ul_indent/md007_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md007_ul_indent.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md009_trailing_spaces/md009_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md009_trailing_spaces.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md010_no_hard_tabs/md010_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md010_no_hard_tabs.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md011_no_reversed_links.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md012_no_multiple_blanks/md012_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md012_no_multiple_blanks.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md013_line_length/md013_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md014_commands_show_output/md014_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md014_commands_show_output.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md018_no_missing_space_atx.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md019_no_multiple_space_atx.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md020_no_missing_space_closed_atx.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md021_no_multiple_space_closed_atx.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md022_blanks_around_headings/md022_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md022_blanks_around_headings.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md023_heading_start_left.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md024_no_duplicate_heading/md024_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md024_no_duplicate_heading.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md025_single_title/md025_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md025_single_title.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md026_no_trailing_punctuation/md026_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md026_no_trailing_punctuation.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md027_multiple_spaces_blockquote.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md028_no_blanks_blockquote.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md029_ordered_list_prefix/md029_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md029_ordered_list_prefix.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md030_list_marker_space/md030_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md030_list_marker_space.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md031_blanks_around_fences.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md032_blanks_around_lists.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md033_no_inline_html/md033_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md034_no_bare_urls.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md035_hr_style/md035_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md035_hr_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md036_no_emphasis_only_first/md036_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md036_no_emphasis_only_first.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md037_spaces_around_emphasis.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md038_no_space_in_code.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md039_no_space_in_links.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md040_fenced_code_language.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md041_first_line_heading.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md042_no_empty_links.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md043_required_headings.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md044_proper_names/md044_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md044_proper_names.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md045_no_alt_text/md045_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md045_no_alt_text.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md046_code_block_style/md046_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md046_code_block_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md047_single_trailing_newline.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md048_code_fence_style/md048_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md048_code_fence_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md049_emphasis_style/md049_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md049_emphasis_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md050_strong_style/md050_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md050_strong_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md051_link_fragments.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md053_link_image_reference_definitions.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md054_link_image_style/md054_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md055_table_pipe_style/md055_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md055_table_pipe_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md056_table_column_count.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md057_existing_relative_links/md057_config.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md057_existing_relative_links.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/md058_blanks_around_tables.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/rules/strong_style.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/anchor_styles/github.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/anchor_styles/jekyll.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/anchor_styles/kramdown.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/anchor_styles/kramdown_gfm.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/anchor_styles/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/ast_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/code_block_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/document_structure.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/early_returns.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/element_cache.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/emphasis_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/fix_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/header_id_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/markdown_elements.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/range_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/skip_context.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/string_interner.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/utils/table_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/src/vscode.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/advanced_integration_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/character_ranges/additional_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/character_ranges/basic_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/character_ranges/comprehensive_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/character_ranges/extended_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/character_ranges/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/character_ranges/unicode_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/cli_duplication_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/cli_explain_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/cli_flag_precedence_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/cli_integration_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/cli_lsp_fix_consistency.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/cli_statistics_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/common/cli_test_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/common/fixtures.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/common/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/common/test_utils.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/commonmark_compliance_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/comprehensive_integration_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/comprehensive_output_format_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/config_application_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/config_file_command_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/config_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/configuration_inheritance_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/consistency_regression_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/cross_platform_compatibility_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/deeply_nested_lists_performance_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/escaped_brackets_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/final_confidence_assessment.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/fixable_unfixable_config_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/init_command_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/init_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/inline_config_blocks_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/inline_config_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/integration_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/json_output_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/kramdown_integration_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/lib.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/lsp_editor_integration_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/lsp_integration_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/lsp_memory_leak_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/lsp_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/malformed_markdown_stress_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/markdownlint_cli_integration.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/markdownlint_config_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/markdownlintignore_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/md013_reflow_integration_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/md051_issue_39_regression_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/nested_code_block_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/output_format_integration_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/output_format_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/perf_check.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/performance_validation_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/pyproject_config_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/python_bindings_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/real_world_repository_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/regression_prevention_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/emphasis_edge_cases_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/heading_edge_cases_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/inline_content_edge_cases_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/link_edge_cases_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/list_rules_integration_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md001_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md001_unicode_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md002_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md003_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md004_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md005_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md005_unicode_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md006_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md006_unicode_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md007_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md009_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md010_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md011_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md012_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md014_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md018_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md019_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md020_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md021_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md022_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md023_extended_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md023_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md024_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md025_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md026_kramdown_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md026_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md027_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md028_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md029_code_block_separation_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md029_issue42_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md029_pathological_edge_cases_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md029_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md029_unicode_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md030_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md031_kramdown_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md031_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md032_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md033_extended_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md033_kramdown_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md033_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md034_ipv6_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md034_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md035_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md036_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md037_kramdown_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md037_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md038_nested_backticks_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md038_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md039_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md040_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md041_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md042_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md043_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md044_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md045_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md046_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md047_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md048_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md049_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md050_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md051_comprehensive_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md051_critical_edge_cases_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md051_edge_cases_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md051_issue_39_regression_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md051_performance_edge_cases_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md051_property_based_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md051_regression_prevention_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md051_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md051_unicode_security_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md052_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md053_additional_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md053_proptest.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md053_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md054_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md054_unicode_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md055_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md056_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md057_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md058_kramdown_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/md058_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/rules_mod_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/skip_context_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/test_underscore_edge_cases.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/thread_safety_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/unicode_edge_case_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/utils/blockquote_utils_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/utils/code_block_utils_extended_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/utils/code_block_utils_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/utils/core_utils_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/utils/front_matter_utils_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/utils/line_index_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/utils/mod.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/utils_markdown_edge_cases.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/utils_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/vscode_extension_fixes.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/vscode_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/vscode_tests.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/vscode_windows_comprehensive_test.rs +0 -0
- {rumdl-0.0.122 → rumdl-0.0.123}/tests/vscode_windows_test.rs +0 -0
|
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.0.123] - 2025-08-21
|
|
11
|
+
|
|
12
|
+
## [0.0.123] - 2025-08-21
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- **MD013**: Comprehensive markdown pattern preservation during text reflow
|
|
16
|
+
- Preserves reference links, footnotes, math formulas, wiki links, and more
|
|
17
|
+
- Centralized regex patterns for better maintainability
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- **CLI**: Correct unfixable rules status display and fix counts (closes #56)
|
|
21
|
+
- Rules marked as unfixable now show `[unfixable]` in yellow instead of `[fixed]`
|
|
22
|
+
- Fix count now correctly excludes unfixable rules (e.g., "3 of 6" instead of "6 of 6")
|
|
23
|
+
- Added FixCapability enum to Rule trait for compile-time safety
|
|
24
|
+
- **MD013**: Preserve reference links during text reflow
|
|
25
|
+
- Reference-style links are now properly preserved when reflowing text
|
|
26
|
+
- Fixed indicator display to correctly show `[fixed]` when issues are resolved
|
|
27
|
+
- **Tests**: Mark kramdown definition list doctest as text to fix test failures
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- **Internal**: Centralized markdown pattern regexes and extended reflow support
|
|
31
|
+
- Improved code organization and reduced duplication
|
|
32
|
+
- Better performance through shared regex compilation
|
|
33
|
+
|
|
10
34
|
## [0.0.122] - 2025-08-19
|
|
11
35
|
|
|
12
36
|
## [0.0.121] - 2025-08-19
|
|
@@ -372,7 +396,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
372
396
|
|
|
373
397
|
- Initial implementation of remaining rules for markdownlint parity
|
|
374
398
|
|
|
375
|
-
[Unreleased]: https://github.com/rvben/rumdl/compare/v0.0.
|
|
399
|
+
[Unreleased]: https://github.com/rvben/rumdl/compare/v0.0.123...HEAD
|
|
400
|
+
[0.0.123]: https://github.com/rvben/rumdl/compare/v0.0.122...v0.0.123
|
|
376
401
|
[0.0.122]: https://github.com/rvben/rumdl/compare/v0.0.121...v0.0.122
|
|
377
402
|
[0.0.121]: https://github.com/rvben/rumdl/compare/v0.0.120...v0.0.121
|
|
378
403
|
[0.0.120]: https://github.com/rvben/rumdl/compare/v0.0.119...v0.0.120
|
|
@@ -530,9 +530,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
530
530
|
|
|
531
531
|
[[package]]
|
|
532
532
|
name = "form_urlencoded"
|
|
533
|
-
version = "1.2.
|
|
533
|
+
version = "1.2.2"
|
|
534
534
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
535
|
-
checksum = "
|
|
535
|
+
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
|
|
536
536
|
dependencies = [
|
|
537
537
|
"percent-encoding",
|
|
538
538
|
]
|
|
@@ -806,9 +806,9 @@ dependencies = [
|
|
|
806
806
|
|
|
807
807
|
[[package]]
|
|
808
808
|
name = "idna"
|
|
809
|
-
version = "1.0
|
|
809
|
+
version = "1.1.0"
|
|
810
810
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
811
|
-
checksum = "
|
|
811
|
+
checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
|
|
812
812
|
dependencies = [
|
|
813
813
|
"idna_adapter",
|
|
814
814
|
"smallvec",
|
|
@@ -1126,9 +1126,9 @@ dependencies = [
|
|
|
1126
1126
|
|
|
1127
1127
|
[[package]]
|
|
1128
1128
|
name = "percent-encoding"
|
|
1129
|
-
version = "2.3.
|
|
1129
|
+
version = "2.3.2"
|
|
1130
1130
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1131
|
-
checksum = "
|
|
1131
|
+
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
|
1132
1132
|
|
|
1133
1133
|
[[package]]
|
|
1134
1134
|
name = "pin-project"
|
|
@@ -1493,7 +1493,7 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|
|
1493
1493
|
|
|
1494
1494
|
[[package]]
|
|
1495
1495
|
name = "rumdl"
|
|
1496
|
-
version = "0.0.
|
|
1496
|
+
version = "0.0.123"
|
|
1497
1497
|
dependencies = [
|
|
1498
1498
|
"anyhow",
|
|
1499
1499
|
"assert_cmd",
|
|
@@ -1751,15 +1751,15 @@ checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
|
|
|
1751
1751
|
|
|
1752
1752
|
[[package]]
|
|
1753
1753
|
name = "tempfile"
|
|
1754
|
-
version = "3.
|
|
1754
|
+
version = "3.21.0"
|
|
1755
1755
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1756
|
-
checksum = "
|
|
1756
|
+
checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e"
|
|
1757
1757
|
dependencies = [
|
|
1758
1758
|
"fastrand",
|
|
1759
1759
|
"getrandom",
|
|
1760
1760
|
"once_cell",
|
|
1761
1761
|
"rustix",
|
|
1762
|
-
"windows-sys 0.
|
|
1762
|
+
"windows-sys 0.60.2",
|
|
1763
1763
|
]
|
|
1764
1764
|
|
|
1765
1765
|
[[package]]
|
|
@@ -1770,18 +1770,18 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683"
|
|
|
1770
1770
|
|
|
1771
1771
|
[[package]]
|
|
1772
1772
|
name = "thiserror"
|
|
1773
|
-
version = "2.0.
|
|
1773
|
+
version = "2.0.16"
|
|
1774
1774
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1775
|
-
checksum = "
|
|
1775
|
+
checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"
|
|
1776
1776
|
dependencies = [
|
|
1777
1777
|
"thiserror-impl",
|
|
1778
1778
|
]
|
|
1779
1779
|
|
|
1780
1780
|
[[package]]
|
|
1781
1781
|
name = "thiserror-impl"
|
|
1782
|
-
version = "2.0.
|
|
1782
|
+
version = "2.0.16"
|
|
1783
1783
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1784
|
-
checksum = "
|
|
1784
|
+
checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
|
|
1785
1785
|
dependencies = [
|
|
1786
1786
|
"proc-macro2",
|
|
1787
1787
|
"quote",
|
|
@@ -2080,9 +2080,9 @@ checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
|
|
|
2080
2080
|
|
|
2081
2081
|
[[package]]
|
|
2082
2082
|
name = "url"
|
|
2083
|
-
version = "2.5.
|
|
2083
|
+
version = "2.5.6"
|
|
2084
2084
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2085
|
-
checksum = "
|
|
2085
|
+
checksum = "137a3c834eaf7139b73688502f3f1141a0337c5d8e4d9b536f9b8c796e26a7c4"
|
|
2086
2086
|
dependencies = [
|
|
2087
2087
|
"form_urlencoded",
|
|
2088
2088
|
"idna",
|
|
@@ -2206,11 +2206,11 @@ dependencies = [
|
|
|
2206
2206
|
|
|
2207
2207
|
[[package]]
|
|
2208
2208
|
name = "winapi-util"
|
|
2209
|
-
version = "0.1.
|
|
2209
|
+
version = "0.1.10"
|
|
2210
2210
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2211
|
-
checksum = "
|
|
2211
|
+
checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22"
|
|
2212
2212
|
dependencies = [
|
|
2213
|
-
"windows-sys 0.
|
|
2213
|
+
"windows-sys 0.60.2",
|
|
2214
2214
|
]
|
|
2215
2215
|
|
|
2216
2216
|
[[package]]
|
|
@@ -2355,6 +2355,26 @@ fn print_statistics(warnings: &[rumdl::rule::LintWarning]) {
|
|
|
2355
2355
|
);
|
|
2356
2356
|
}
|
|
2357
2357
|
|
|
2358
|
+
// Helper function to check if a rule is actually fixable based on configuration
|
|
2359
|
+
fn is_rule_actually_fixable(config: &rumdl_config::Config, rule_name: &str) -> bool {
|
|
2360
|
+
// Check unfixable list
|
|
2361
|
+
if config
|
|
2362
|
+
.global
|
|
2363
|
+
.unfixable
|
|
2364
|
+
.iter()
|
|
2365
|
+
.any(|r| r.eq_ignore_ascii_case(rule_name))
|
|
2366
|
+
{
|
|
2367
|
+
return false;
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
// Check fixable list if specified
|
|
2371
|
+
if !config.global.fixable.is_empty() {
|
|
2372
|
+
return config.global.fixable.iter().any(|r| r.eq_ignore_ascii_case(rule_name));
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
true
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2358
2378
|
// Process file with output formatter
|
|
2359
2379
|
#[allow(clippy::too_many_arguments)]
|
|
2360
2380
|
fn process_file_with_formatter(
|
|
@@ -2371,7 +2391,7 @@ fn process_file_with_formatter(
|
|
|
2371
2391
|
|
|
2372
2392
|
// Call the original process_file_inner to get warnings
|
|
2373
2393
|
let (all_warnings, mut content, total_warnings, fixable_warnings) =
|
|
2374
|
-
process_file_inner(file_path, rules, verbose, quiet);
|
|
2394
|
+
process_file_inner(file_path, rules, verbose, quiet, config);
|
|
2375
2395
|
|
|
2376
2396
|
if total_warnings == 0 {
|
|
2377
2397
|
return (false, 0, 0, 0, Vec::new());
|
|
@@ -2408,14 +2428,25 @@ fn process_file_with_formatter(
|
|
|
2408
2428
|
// Create a custom formatter that shows [fixed] instead of [*]
|
|
2409
2429
|
let mut output = String::new();
|
|
2410
2430
|
for warning in &all_warnings {
|
|
2431
|
+
let rule_name = warning.rule_name.unwrap_or("unknown");
|
|
2432
|
+
|
|
2433
|
+
// Check if the rule is actually fixable based on configuration
|
|
2434
|
+
let is_fixable = is_rule_actually_fixable(config, rule_name);
|
|
2435
|
+
|
|
2411
2436
|
let was_fixed = warning.fix.is_some()
|
|
2437
|
+
&& is_fixable
|
|
2412
2438
|
&& !remaining_warnings.iter().any(|w| {
|
|
2413
2439
|
w.line == warning.line && w.column == warning.column && w.rule_name == warning.rule_name
|
|
2414
2440
|
});
|
|
2415
2441
|
|
|
2416
|
-
let
|
|
2417
|
-
|
|
2418
|
-
|
|
2442
|
+
let fix_indicator = if warning.fix.is_some() {
|
|
2443
|
+
if !is_fixable {
|
|
2444
|
+
" [unfixable]".yellow().to_string()
|
|
2445
|
+
} else if was_fixed {
|
|
2446
|
+
" [fixed]".green().to_string()
|
|
2447
|
+
} else {
|
|
2448
|
+
String::new()
|
|
2449
|
+
}
|
|
2419
2450
|
} else {
|
|
2420
2451
|
String::new()
|
|
2421
2452
|
};
|
|
@@ -2454,6 +2485,7 @@ fn process_file_inner(
|
|
|
2454
2485
|
rules: &[Box<dyn Rule>],
|
|
2455
2486
|
verbose: bool,
|
|
2456
2487
|
quiet: bool,
|
|
2488
|
+
config: &rumdl_config::Config,
|
|
2457
2489
|
) -> (Vec<rumdl::rule::LintWarning>, String, usize, usize) {
|
|
2458
2490
|
use std::time::Instant;
|
|
2459
2491
|
|
|
@@ -2507,8 +2539,11 @@ fn process_file_inner(
|
|
|
2507
2539
|
|
|
2508
2540
|
let total_warnings = all_warnings.len();
|
|
2509
2541
|
|
|
2510
|
-
// Count fixable issues
|
|
2511
|
-
let fixable_warnings = all_warnings
|
|
2542
|
+
// Count fixable issues (excluding unfixable rules)
|
|
2543
|
+
let fixable_warnings = all_warnings
|
|
2544
|
+
.iter()
|
|
2545
|
+
.filter(|w| w.fix.is_some() && w.rule_name.is_some_and(|name| is_rule_actually_fixable(config, name)))
|
|
2546
|
+
.count();
|
|
2512
2547
|
|
|
2513
2548
|
let lint_end_time = Instant::now();
|
|
2514
2549
|
let lint_time = lint_end_time.duration_since(lint_start);
|
|
@@ -81,6 +81,17 @@ pub enum RuleCategory {
|
|
|
81
81
|
Other,
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
/// Capability of a rule to fix issues
|
|
85
|
+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
86
|
+
pub enum FixCapability {
|
|
87
|
+
/// Rule can automatically fix all violations it detects
|
|
88
|
+
FullyFixable,
|
|
89
|
+
/// Rule can fix some violations based on context
|
|
90
|
+
ConditionallyFixable,
|
|
91
|
+
/// Rule cannot fix violations (by design)
|
|
92
|
+
Unfixable,
|
|
93
|
+
}
|
|
94
|
+
|
|
84
95
|
/// Remove marker /// TRAIT_MARKER_V1
|
|
85
96
|
pub trait Rule: DynClone + Send + Sync {
|
|
86
97
|
fn name(&self) -> &'static str;
|
|
@@ -148,6 +159,11 @@ pub trait Rule: DynClone + Send + Sync {
|
|
|
148
159
|
None
|
|
149
160
|
}
|
|
150
161
|
|
|
162
|
+
/// Declares the fix capability of this rule
|
|
163
|
+
fn fix_capability(&self) -> FixCapability {
|
|
164
|
+
FixCapability::FullyFixable // Safe default for backward compatibility
|
|
165
|
+
}
|
|
166
|
+
|
|
151
167
|
/// Factory: create a rule from config (if present), or use defaults.
|
|
152
168
|
fn from_config(_config: &crate::config::Config) -> Box<dyn Rule>
|
|
153
169
|
where
|
|
@@ -209,9 +209,6 @@ impl Rule for MD013LineLength {
|
|
|
209
209
|
content.lines().collect()
|
|
210
210
|
};
|
|
211
211
|
|
|
212
|
-
// Pre-compute LineIndex for efficient byte range calculations
|
|
213
|
-
let line_index = crate::utils::range_utils::LineIndex::new(content.to_string());
|
|
214
|
-
|
|
215
212
|
// Create a quick lookup set for heading lines
|
|
216
213
|
let heading_lines_set: std::collections::HashSet<usize> = structure.heading_lines.iter().cloned().collect();
|
|
217
214
|
|
|
@@ -309,40 +306,19 @@ impl Rule for MD013LineLength {
|
|
|
309
306
|
}
|
|
310
307
|
}
|
|
311
308
|
|
|
312
|
-
//
|
|
313
|
-
let fix = if !self.should_skip_line_for_fix(line, line_num, structure) {
|
|
314
|
-
//
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
if trimmed_len <= line_limit {
|
|
321
|
-
let line_start = line_index.line_col_to_byte_range(line_number, 1).start;
|
|
322
|
-
let line_end = if line_number < lines.len() {
|
|
323
|
-
line_index.line_col_to_byte_range(line_number + 1, 1).start - 1
|
|
324
|
-
} else {
|
|
325
|
-
content.len()
|
|
326
|
-
};
|
|
327
|
-
Some(crate::rule::Fix {
|
|
328
|
-
range: line_start..line_end,
|
|
329
|
-
replacement: trimmed.to_string(),
|
|
330
|
-
})
|
|
331
|
-
} else {
|
|
332
|
-
None
|
|
333
|
-
}
|
|
334
|
-
} else {
|
|
335
|
-
None // Skip expensive sentence splitting for performance
|
|
336
|
-
}
|
|
309
|
+
// Only provide a fix if reflow is enabled
|
|
310
|
+
let fix = if self.config.enable_reflow && !self.should_skip_line_for_fix(line, line_num, structure) {
|
|
311
|
+
// Provide a placeholder fix to indicate that reflow will happen
|
|
312
|
+
// The actual reflow is done in the fix() method
|
|
313
|
+
Some(crate::rule::Fix {
|
|
314
|
+
range: 0..0, // Placeholder range
|
|
315
|
+
replacement: String::new(), // Placeholder replacement
|
|
316
|
+
})
|
|
337
317
|
} else {
|
|
338
318
|
None
|
|
339
319
|
};
|
|
340
320
|
|
|
341
|
-
let message =
|
|
342
|
-
format!("Line length {effective_length} exceeds {line_limit} characters (can trim whitespace)")
|
|
343
|
-
} else {
|
|
344
|
-
format!("Line length {effective_length} exceeds {line_limit} characters")
|
|
345
|
-
};
|
|
321
|
+
let message = format!("Line length {effective_length} exceeds {line_limit} characters");
|
|
346
322
|
|
|
347
323
|
// Calculate precise character range for the excess portion
|
|
348
324
|
let (start_line, start_col, end_line, end_col) = calculate_excess_range(line_number, line, line_limit);
|
|
@@ -362,7 +338,7 @@ impl Rule for MD013LineLength {
|
|
|
362
338
|
}
|
|
363
339
|
|
|
364
340
|
fn fix(&self, ctx: &crate::lint_context::LintContext) -> Result<String, LintError> {
|
|
365
|
-
//
|
|
341
|
+
// Only fix if reflow is enabled
|
|
366
342
|
if self.config.enable_reflow {
|
|
367
343
|
let reflow_options = crate::utils::text_reflow::ReflowOptions {
|
|
368
344
|
line_length: self.config.line_length,
|
|
@@ -373,50 +349,8 @@ impl Rule for MD013LineLength {
|
|
|
373
349
|
return Ok(crate::utils::text_reflow::reflow_markdown(ctx.content, &reflow_options));
|
|
374
350
|
}
|
|
375
351
|
|
|
376
|
-
//
|
|
377
|
-
|
|
378
|
-
let warnings = self.check(ctx)?;
|
|
379
|
-
|
|
380
|
-
// If no warnings, return original content without allocation
|
|
381
|
-
if warnings.is_empty() {
|
|
382
|
-
return Ok(ctx.content.to_string());
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
// Collect all fixes - check if any exist before allocating
|
|
386
|
-
let mut has_any_fix = false;
|
|
387
|
-
for w in &warnings {
|
|
388
|
-
if w.fix.is_some() {
|
|
389
|
-
has_any_fix = true;
|
|
390
|
-
break;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
if !has_any_fix {
|
|
395
|
-
return Ok(ctx.content.to_string());
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
// Now collect fixes since we know there's at least one
|
|
399
|
-
let mut fixes: Vec<_> = warnings
|
|
400
|
-
.iter()
|
|
401
|
-
.filter_map(|w| w.fix.as_ref().map(|f| (f.range.start, f.range.end, &f.replacement)))
|
|
402
|
-
.collect();
|
|
403
|
-
|
|
404
|
-
// This should not happen given our check above, but just in case
|
|
405
|
-
if fixes.is_empty() {
|
|
406
|
-
return Ok(ctx.content.to_string());
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
fixes.sort_by(|a, b| b.0.cmp(&a.0));
|
|
410
|
-
|
|
411
|
-
// Apply fixes from end to beginning to preserve byte offsets
|
|
412
|
-
let mut result = ctx.content.to_string();
|
|
413
|
-
for (start, end, replacement) in fixes {
|
|
414
|
-
if start < result.len() && end <= result.len() && start <= end {
|
|
415
|
-
result.replace_range(start..end, replacement);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
Ok(result)
|
|
352
|
+
// Without reflow, MD013 has no fixes available
|
|
353
|
+
Ok(ctx.content.to_string())
|
|
420
354
|
}
|
|
421
355
|
|
|
422
356
|
fn as_any(&self) -> &dyn std::any::Any {
|
|
@@ -753,20 +687,19 @@ mod tests {
|
|
|
753
687
|
}
|
|
754
688
|
|
|
755
689
|
#[test]
|
|
756
|
-
fn
|
|
690
|
+
fn test_no_fix_without_reflow() {
|
|
757
691
|
let rule = MD013LineLength::new(60, false, false, false, false);
|
|
758
692
|
let content = "This line has trailing whitespace that makes it too long ";
|
|
759
693
|
let ctx = LintContext::new(content);
|
|
760
694
|
let result = rule.check(&ctx).unwrap();
|
|
761
695
|
|
|
762
696
|
assert_eq!(result.len(), 1);
|
|
763
|
-
//
|
|
764
|
-
assert!(result[0].fix.
|
|
765
|
-
assert!(result[0].message.contains("can trim whitespace"));
|
|
697
|
+
// Without enable_reflow, no fix is provided
|
|
698
|
+
assert!(result[0].fix.is_none());
|
|
766
699
|
|
|
767
|
-
//
|
|
700
|
+
// Fix method returns content unchanged
|
|
768
701
|
let fixed = rule.fix(&ctx).unwrap();
|
|
769
|
-
assert_eq!(fixed
|
|
702
|
+
assert_eq!(fixed, content);
|
|
770
703
|
}
|
|
771
704
|
|
|
772
705
|
#[test]
|
|
@@ -841,15 +774,14 @@ Another long line that should trigger a warning."#;
|
|
|
841
774
|
}
|
|
842
775
|
|
|
843
776
|
#[test]
|
|
844
|
-
fn
|
|
777
|
+
fn test_fix_without_reflow_preserves_content() {
|
|
845
778
|
let rule = MD013LineLength::new(50, false, false, false, false);
|
|
846
779
|
let content = "Line 1\nThis line has trailing spaces and is too long \nLine 3";
|
|
847
780
|
let ctx = LintContext::new(content);
|
|
848
781
|
|
|
782
|
+
// Without enable_reflow, content is unchanged
|
|
849
783
|
let fixed = rule.fix(&ctx).unwrap();
|
|
850
|
-
|
|
851
|
-
assert!(fixed.contains("Line 3"));
|
|
852
|
-
assert!(!fixed.contains(" \n")); // Trailing spaces removed
|
|
784
|
+
assert_eq!(fixed, content);
|
|
853
785
|
}
|
|
854
786
|
|
|
855
787
|
#[test]
|
|
@@ -1105,4 +1037,173 @@ And a bullet list:
|
|
|
1105
1037
|
// Since there's no trailing whitespace, content should be unchanged
|
|
1106
1038
|
assert_eq!(fixed, content);
|
|
1107
1039
|
}
|
|
1040
|
+
|
|
1041
|
+
#[test]
|
|
1042
|
+
fn test_reflow_with_hard_line_breaks() {
|
|
1043
|
+
// Test that lines with exactly 2 trailing spaces are preserved as hard breaks
|
|
1044
|
+
let config = MD013Config {
|
|
1045
|
+
line_length: 40,
|
|
1046
|
+
enable_reflow: true,
|
|
1047
|
+
..Default::default()
|
|
1048
|
+
};
|
|
1049
|
+
let rule = MD013LineLength::from_config_struct(config);
|
|
1050
|
+
|
|
1051
|
+
// Test with exactly 2 spaces (hard line break)
|
|
1052
|
+
let content = "This line has a hard break at the end \nAnd this continues on the next line that is also quite long and needs wrapping";
|
|
1053
|
+
let ctx = LintContext::new(content);
|
|
1054
|
+
let fixed = rule.fix(&ctx).unwrap();
|
|
1055
|
+
|
|
1056
|
+
// Should preserve the hard line break (2 spaces)
|
|
1057
|
+
assert!(
|
|
1058
|
+
fixed.contains(" \n"),
|
|
1059
|
+
"Hard line break with exactly 2 spaces should be preserved"
|
|
1060
|
+
);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
#[test]
|
|
1064
|
+
fn test_reflow_preserves_reference_links() {
|
|
1065
|
+
let config = MD013Config {
|
|
1066
|
+
line_length: 40,
|
|
1067
|
+
enable_reflow: true,
|
|
1068
|
+
..Default::default()
|
|
1069
|
+
};
|
|
1070
|
+
let rule = MD013LineLength::from_config_struct(config);
|
|
1071
|
+
|
|
1072
|
+
let content = "This is a very long line with a [reference link][ref] that should not be broken apart when reflowing the text.
|
|
1073
|
+
|
|
1074
|
+
[ref]: https://example.com";
|
|
1075
|
+
let ctx = LintContext::new(content);
|
|
1076
|
+
let fixed = rule.fix(&ctx).unwrap();
|
|
1077
|
+
|
|
1078
|
+
// Reference link should remain intact
|
|
1079
|
+
assert!(fixed.contains("[reference link][ref]"));
|
|
1080
|
+
assert!(!fixed.contains("[ reference link]"));
|
|
1081
|
+
assert!(!fixed.contains("[ref ]"));
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
#[test]
|
|
1085
|
+
fn test_reflow_with_nested_markdown_elements() {
|
|
1086
|
+
let config = MD013Config {
|
|
1087
|
+
line_length: 35,
|
|
1088
|
+
enable_reflow: true,
|
|
1089
|
+
..Default::default()
|
|
1090
|
+
};
|
|
1091
|
+
let rule = MD013LineLength::from_config_struct(config);
|
|
1092
|
+
|
|
1093
|
+
let content = "This text has **bold with `code` inside** and should handle it properly when wrapping";
|
|
1094
|
+
let ctx = LintContext::new(content);
|
|
1095
|
+
let fixed = rule.fix(&ctx).unwrap();
|
|
1096
|
+
|
|
1097
|
+
// Nested elements should be preserved
|
|
1098
|
+
assert!(fixed.contains("**bold with `code` inside**"));
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
#[test]
|
|
1102
|
+
fn test_reflow_with_unbalanced_markdown() {
|
|
1103
|
+
// Test edge case with unbalanced markdown
|
|
1104
|
+
let config = MD013Config {
|
|
1105
|
+
line_length: 30,
|
|
1106
|
+
enable_reflow: true,
|
|
1107
|
+
..Default::default()
|
|
1108
|
+
};
|
|
1109
|
+
let rule = MD013LineLength::from_config_struct(config);
|
|
1110
|
+
|
|
1111
|
+
let content = "This has **unbalanced bold that goes on for a very long time without closing";
|
|
1112
|
+
let ctx = LintContext::new(content);
|
|
1113
|
+
let fixed = rule.fix(&ctx).unwrap();
|
|
1114
|
+
|
|
1115
|
+
// Should handle gracefully without panic
|
|
1116
|
+
// The text reflow handles unbalanced markdown by treating it as a bold element
|
|
1117
|
+
// Check that the content is properly reflowed without panic
|
|
1118
|
+
assert!(!fixed.is_empty());
|
|
1119
|
+
// Verify the content is wrapped to 30 chars
|
|
1120
|
+
for line in fixed.lines() {
|
|
1121
|
+
assert!(line.len() <= 30 || line.starts_with("**"), "Line exceeds limit: {line}");
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
#[test]
|
|
1126
|
+
fn test_reflow_fix_indicator() {
|
|
1127
|
+
// Test that enable_reflow provides fix indicators
|
|
1128
|
+
let config = MD013Config {
|
|
1129
|
+
line_length: 30,
|
|
1130
|
+
enable_reflow: true,
|
|
1131
|
+
..Default::default()
|
|
1132
|
+
};
|
|
1133
|
+
let rule = MD013LineLength::from_config_struct(config);
|
|
1134
|
+
|
|
1135
|
+
let content = "This is a very long line that definitely exceeds the thirty character limit";
|
|
1136
|
+
let ctx = LintContext::new(content);
|
|
1137
|
+
let warnings = rule.check(&ctx).unwrap();
|
|
1138
|
+
|
|
1139
|
+
// Should have a fix indicator when enable_reflow is true
|
|
1140
|
+
assert!(!warnings.is_empty());
|
|
1141
|
+
assert!(
|
|
1142
|
+
warnings[0].fix.is_some(),
|
|
1143
|
+
"Should provide fix indicator when enable_reflow is true"
|
|
1144
|
+
);
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
#[test]
|
|
1148
|
+
fn test_no_fix_indicator_without_reflow() {
|
|
1149
|
+
// Test that without enable_reflow, no fix is provided
|
|
1150
|
+
let config = MD013Config {
|
|
1151
|
+
line_length: 30,
|
|
1152
|
+
enable_reflow: false,
|
|
1153
|
+
..Default::default()
|
|
1154
|
+
};
|
|
1155
|
+
let rule = MD013LineLength::from_config_struct(config);
|
|
1156
|
+
|
|
1157
|
+
let content = "This is a very long line that definitely exceeds the thirty character limit";
|
|
1158
|
+
let ctx = LintContext::new(content);
|
|
1159
|
+
let warnings = rule.check(&ctx).unwrap();
|
|
1160
|
+
|
|
1161
|
+
// Should NOT have a fix indicator when enable_reflow is false
|
|
1162
|
+
assert!(!warnings.is_empty());
|
|
1163
|
+
assert!(
|
|
1164
|
+
warnings[0].fix.is_none(),
|
|
1165
|
+
"Should not provide fix when enable_reflow is false"
|
|
1166
|
+
);
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
#[test]
|
|
1170
|
+
fn test_reflow_preserves_all_reference_link_types() {
|
|
1171
|
+
let config = MD013Config {
|
|
1172
|
+
line_length: 40,
|
|
1173
|
+
enable_reflow: true,
|
|
1174
|
+
..Default::default()
|
|
1175
|
+
};
|
|
1176
|
+
let rule = MD013LineLength::from_config_struct(config);
|
|
1177
|
+
|
|
1178
|
+
let content = "Test [full reference][ref] and [collapsed][] and [shortcut] reference links in a very long line.
|
|
1179
|
+
|
|
1180
|
+
[ref]: https://example.com
|
|
1181
|
+
[collapsed]: https://example.com
|
|
1182
|
+
[shortcut]: https://example.com";
|
|
1183
|
+
|
|
1184
|
+
let ctx = LintContext::new(content);
|
|
1185
|
+
let fixed = rule.fix(&ctx).unwrap();
|
|
1186
|
+
|
|
1187
|
+
// All reference link types should be preserved
|
|
1188
|
+
assert!(fixed.contains("[full reference][ref]"));
|
|
1189
|
+
assert!(fixed.contains("[collapsed][]"));
|
|
1190
|
+
assert!(fixed.contains("[shortcut]"));
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
#[test]
|
|
1194
|
+
fn test_reflow_handles_images_correctly() {
|
|
1195
|
+
let config = MD013Config {
|
|
1196
|
+
line_length: 40,
|
|
1197
|
+
enable_reflow: true,
|
|
1198
|
+
..Default::default()
|
|
1199
|
+
};
|
|
1200
|
+
let rule = MD013LineLength::from_config_struct(config);
|
|
1201
|
+
|
|
1202
|
+
let content = "This line has an  that should not be broken when reflowing.";
|
|
1203
|
+
let ctx = LintContext::new(content);
|
|
1204
|
+
let fixed = rule.fix(&ctx).unwrap();
|
|
1205
|
+
|
|
1206
|
+
// Image should remain intact
|
|
1207
|
+
assert!(fixed.contains(""));
|
|
1208
|
+
}
|
|
1108
1209
|
}
|
|
@@ -425,6 +425,10 @@ impl Rule for MD033NoInlineHtml {
|
|
|
425
425
|
Ok(ctx.content.to_string())
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
+
fn fix_capability(&self) -> crate::rule::FixCapability {
|
|
429
|
+
crate::rule::FixCapability::Unfixable
|
|
430
|
+
}
|
|
431
|
+
|
|
428
432
|
/// Get the category of this rule for selective processing
|
|
429
433
|
fn category(&self) -> RuleCategory {
|
|
430
434
|
RuleCategory::Html
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
use crate::rule::{LintError, LintResult, LintWarning, Rule, Severity};
|
|
2
2
|
use crate::utils::range_utils::calculate_match_range;
|
|
3
|
-
use crate::utils::regex_cache::HTML_COMMENT_PATTERN;
|
|
3
|
+
use crate::utils::regex_cache::{HTML_COMMENT_PATTERN, SHORTCUT_REF_REGEX};
|
|
4
4
|
use crate::utils::skip_context::{is_in_front_matter, is_in_math_context, is_in_table_cell};
|
|
5
|
-
use fancy_regex::Regex as FancyRegex;
|
|
6
5
|
use lazy_static::lazy_static;
|
|
7
6
|
use regex::Regex;
|
|
8
7
|
use std::collections::{HashMap, HashSet};
|
|
@@ -12,21 +11,6 @@ lazy_static! {
|
|
|
12
11
|
// Note: \S* instead of \S+ to allow empty definitions like [ref]:
|
|
13
12
|
static ref REF_REGEX: Regex = Regex::new(r"^\s*\[([^\]]+)\]:\s*.*").unwrap();
|
|
14
13
|
|
|
15
|
-
// Pattern to match reference links and images ONLY: [text][reference] or ![text][reference]
|
|
16
|
-
// These need lookbehind for escaped brackets
|
|
17
|
-
// Use a more sophisticated pattern that handles nested brackets
|
|
18
|
-
static ref REF_LINK_REGEX: FancyRegex = FancyRegex::new(r"(?<!\\)\[((?:[^\[\]\\]|\\.|\[[^\]]*\])*)\]\[([^\]]*)\]").unwrap();
|
|
19
|
-
static ref REF_IMAGE_REGEX: FancyRegex = FancyRegex::new(r"(?<!\\)!\[((?:[^\[\]\\]|\\.|\[[^\]]*\])*)\]\[([^\]]*)\]").unwrap();
|
|
20
|
-
|
|
21
|
-
// Pattern for shortcut reference links [reference]
|
|
22
|
-
// Must not be preceded by ] or ) (to avoid matching second part of [text][ref] or reversed links (url)[text])
|
|
23
|
-
// Must not be followed by [ or ( (to avoid matching first part of [text][ref] or [text](url))
|
|
24
|
-
static ref SHORTCUT_REF_REGEX: FancyRegex = FancyRegex::new(r"(?<![\\)\]])\[([^\]]+)\](?!\s*[\[\(])").unwrap();
|
|
25
|
-
|
|
26
|
-
// Pattern to match inline links and images (to exclude them)
|
|
27
|
-
static ref INLINE_LINK_REGEX: FancyRegex = FancyRegex::new(r"(?<!\\)\[([^\]]+)\]\(([^)]+)\)").unwrap();
|
|
28
|
-
static ref INLINE_IMAGE_REGEX: FancyRegex = FancyRegex::new(r"(?<!\\)!\[([^\]]+)\]\(([^)]+)\)").unwrap();
|
|
29
|
-
|
|
30
14
|
// Pattern for list items to exclude from reference checks (standard regex is fine)
|
|
31
15
|
static ref LIST_ITEM_REGEX: Regex = Regex::new(r"^\s*[-*+]\s+(?:\[[xX\s]\]\s+)?").unwrap();
|
|
32
16
|
|