mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-27 15:55:00 +00:00
fix: Remove unnecessary checks and simplify content extraction in process_markdown function
This commit is contained in:
parent
1d6bdfce80
commit
52ddef9f79
1 changed files with 4 additions and 4 deletions
|
@ -21,15 +21,15 @@ def process_markdown(filename):
|
|||
|
||||
results = []
|
||||
for section in sections:
|
||||
if "editblock_coder.py" in section or "test_editblock.py" in section:
|
||||
continue
|
||||
|
||||
if not section.strip(): # Ignore empty sections
|
||||
continue
|
||||
# Extract the header (if present)
|
||||
header = section.split("\n")[0].strip()
|
||||
# Get the content (everything after the header)
|
||||
content = "\n".join(section.split("\n")[1:]).strip()
|
||||
|
||||
if "editblock" in content:
|
||||
continue
|
||||
content = "".join(section.splitlines(keepends=True)[1:])
|
||||
|
||||
for fence in all_fences:
|
||||
if "\n" + fence[0] in content:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue