mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +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 = []
|
results = []
|
||||||
for section in sections:
|
for section in sections:
|
||||||
|
if "editblock_coder.py" in section or "test_editblock.py" in section:
|
||||||
|
continue
|
||||||
|
|
||||||
if not section.strip(): # Ignore empty sections
|
if not section.strip(): # Ignore empty sections
|
||||||
continue
|
continue
|
||||||
# Extract the header (if present)
|
# Extract the header (if present)
|
||||||
header = section.split("\n")[0].strip()
|
header = section.split("\n")[0].strip()
|
||||||
# Get the content (everything after the header)
|
# Get the content (everything after the header)
|
||||||
content = "\n".join(section.split("\n")[1:]).strip()
|
content = "".join(section.splitlines(keepends=True)[1:])
|
||||||
|
|
||||||
if "editblock" in content:
|
|
||||||
continue
|
|
||||||
|
|
||||||
for fence in all_fences:
|
for fence in all_fences:
|
||||||
if "\n" + fence[0] in content:
|
if "\n" + fence[0] in content:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue