Skip to content

fix: find_filename handles indented fenced block markers - #5723

Open
kingmakeruix wants to merge 1 commit into
Aider-AI:mainfrom
kingmakeruix:fix/find-filename-indented-fences
Open

kingmakeruix wants to merge 1 commit into
Aider-AI:mainfrom
kingmakeruix:fix/find-filename-indented-fences

Conversation

@kingmakeruix

@kingmakeruix kingmakeruix commented Sep 17, 2026 •

Copy link
Copy Markdown

What

Treat indented fenced markers the same as non-indented ones in find_filename when looking back for a filename.

Why

find_filename misses a valid filename when the surrounding fenced block markers have leading whitespace, so a valid multi-line edit is discarded with a missing filename error. Closes #5662.

How

  • Fence-continuation check now uses the stripped line, matching strip_filename behavior
  • Added test_find_filename_with_indented_fences regression test

Checklist

  • Tests pass locally (tests/basic/test_editblock.py 26/26)
  • Follows CONTRIBUTING.md (no type hints, <=100 cols)

@kingmakeruix

Copy link
Copy Markdown
Author

Thanks — following up on this one, since it has been open a while.

All four CI workflows on this PR are sitting in action_required and have never executed:

  • Ubuntu Python Tests
  • Windows Python Tests
  • Docker Build Test
  • pre-commit

Only license/cla has actually run, and it passes. So the "tests pass" claim in the description is currently backed by local runs only (tests/basic/test_exceptions.py) and has never been confirmed by CI on this branch.

I am not sure what the trigger is — it looks like the fork-PR gate rather than anything specific to this change, since other external PRs on main appear to be in the same state. If someone could approve the workflow runs, or tell me the expected path for a contributor in this situation, I would appreciate it. Happy to rebase, re-split, or adjust anything if that is what is needed to get it reviewed.

@kingmakeruix

Copy link
Copy Markdown
Author

Correction to my comment above: this PR is about find_filename, so the local run that backs the description is tests/basic/test_editblock.py (26/26), not test_exceptions.py. That was copy-paste from the other PR. The CI situation is unchanged - all four workflows still action_required and never run.

This branch has not been deployed

No deployments
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.

BUG: find_filename misses filenames when fenced block markers are indented

1 participant