Skip to content

fix nested code blocks in file content making filenames of commands#5106

Draft
xurizaemon wants to merge 2 commits intoAider-AI:mainfrom
xurizaemon:4225-nested_code_blocks
Draft

fix nested code blocks in file content making filenames of commands#5106
xurizaemon wants to merge 2 commits intoAider-AI:mainfrom
xurizaemon:4225-nested_code_blocks

Conversation

@xurizaemon
Copy link
Copy Markdown

@xurizaemon xurizaemon commented May 4, 2026

Hopefully I can get tests to run to repro the issue ...

👋🏼 please authorise CI run @Aider-AI :)

Refs #4225

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 4, 2026

CLA assistant check
All committers have signed the CLA.

When generating files like README.md that contain inner fenced code
blocks (e.g. ```bash), the whole-file parser was treating those inner
fences as end-of-file-block markers, causing commands like
`git clone <repo>` to be used as filenames.

Fixes Aider-AI#4225 by tracking inner fence depth: fences with a language
specifier are treated as content and increment a depth counter; only
a plain closing fence at depth 0 ends the file block.
@xurizaemon xurizaemon marked this pull request as draft May 4, 2026 10:54
@xurizaemon xurizaemon changed the title test: Test nested code blocks in file content fix nested code blocks in file content making filenames of commands May 4, 2026
@xurizaemon
Copy link
Copy Markdown
Author

but unrelated tests on my fork fail ... not sure what's up there

appreciate @Aider-AI if we can see it run here!

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.

2 participants