Skip to content

fix: require exact SEARCH/REPLACE divider in edit blocks#4968

Open
MobiusL00p wants to merge 1 commit intoAider-AI:mainfrom
MobiusL00p:fix-rst-editblock-dividers
Open

fix: require exact SEARCH/REPLACE divider in edit blocks#4968
MobiusL00p wants to merge 1 commit intoAider-AI:mainfrom
MobiusL00p:fix-rst-editblock-dividers

Conversation

@MobiusL00p
Copy link
Copy Markdown

Summary

  • require the SEARCH/REPLACE divider to match the canonical seven = characters instead of any 5-9 = line
  • prevent .rst heading underlines inside SEARCH blocks from being misparsed as edit block dividers
  • add a regression test covering an .rst heading in the SEARCH block

Verification

  • python -m pytest tests/basic/test_editblock.py
  • python -m pytest tests/basic/test_editblock.py -k rst_heading
  • python -m compileall aider/coders/editblock_coder.py tests/basic/test_editblock.py

Closes #1803.

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.

Can't handle rst

1 participant