mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
fix: Catch exceptions in find_original_update_blocks
This commit is contained in:
parent
ac5667696c
commit
b32fa29ba4
1 changed files with 23 additions and 16 deletions
|
@ -22,6 +22,7 @@ def process_markdown(filename):
|
|||
content = "\n".join(section.split("\n")[1:]).strip()
|
||||
|
||||
# Process the content with find_original_update_blocks
|
||||
try:
|
||||
blocks = list(find_original_update_blocks(content, DEFAULT_FENCE))
|
||||
|
||||
# Create a dictionary for this section
|
||||
|
@ -41,6 +42,12 @@ def process_markdown(filename):
|
|||
)
|
||||
|
||||
results.append(section_result)
|
||||
except ValueError as e:
|
||||
# If an error occurs, add it to the results for this section
|
||||
results.append({
|
||||
"header": header,
|
||||
"error": str(e)
|
||||
})
|
||||
|
||||
# Output the results as JSON
|
||||
print(json.dumps(results, indent=4))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue