paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
18.02k stars 1.68k forks source link

gpt35 diff parser gets confused when working with markdown files that use code fences #22

Closed tmm1 closed 1 year ago

tmm1 commented 1 year ago

for example:

README.md
```markdown
# LongMem
...
```
embedded code block in original readme
```
```

will end up with new_lines = [] and replace my README.md with nothing.

paul-gauthier commented 1 year ago

Thanks for reporting this. This is an expected corner case. I have a solution in mind. Will update the issue when I've had a chance to test it out.

paul-gauthier commented 1 year ago

I just pushed a fix that should let aider edit files that contain triple-backtick fences. Let me know if you're able to give it a try and if it solves your issue. You'll need to install the latest from GitHub to pick up this change.

paul-gauthier commented 1 year ago

I'm going to close this issue for now. Feel free to re-open it if you're still having problems.