Skip to content

Dedent configured pathspec patterns - #4155

Open
ishaanlabs-gg wants to merge 1 commit into
mkdocs:masterfrom
ishaanlabs-gg:fix-pathspec-indented-patterns
Open

Dedent configured pathspec patterns#4155
ishaanlabs-gg wants to merge 1 commit into
mkdocs:masterfrom
ishaanlabs-gg:fix-pathspec-indented-patterns

Conversation

@ishaanlabs-gg

Copy link
Copy Markdown

Summary

  • Dedent multiline PathSpec config values before compiling them as gitignore-style patterns.
  • Add regression coverage for indented multiline patterns with comments and negation.

This fixes the current draft_docs behavior where indented examples such as the user-guide-style config no longer match paths with newer pathspec.

Tests

  • python -m unittest mkdocs.tests.config.config_options_tests.PathSpecTest.test_indented_multiline_patterns
  • python -m unittest mkdocs.tests.build_tests.BuildTests.test_draft_docs_with_comments_from_user_guide
  • python -m compileall -q mkdocs/config/config_options.py mkdocs/tests/config/config_options_tests.py
  • git diff --check

AI assistance was used to help prepare this change.

@ishaanlabs-gg

Copy link
Copy Markdown
Author

The remaining CI failures appear unrelated to this patch and happen before MkDocs tests run:

  • test (pypy-3.9-v7.x, ubuntu-latest) fails while installing dependencies. The cryptography wheel build reports: the configured PyPy interpreter version (3.9) is lower than PyO3's minimum supported version (3.11).
  • test (pypy-3.9-v7.x, windows-latest) also fails during dependency installation while building zstandard, with CFFI reporting that distutils/setuptools support is missing.

All CPython test jobs, style, lint, docs build, and package checks passed for this PR.

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.

1 participant