mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
fix: move except ValueError
up right after find_original_update_blocks
This commit is contained in:
parent
1e1bb53ca3
commit
9982863042
1 changed files with 19 additions and 18 deletions
|
@ -31,6 +31,10 @@ def process_markdown(filename):
|
|||
# Process the content with find_original_update_blocks
|
||||
try:
|
||||
blocks = list(find_original_update_blocks(content, DEFAULT_FENCE))
|
||||
except ValueError as e:
|
||||
# If an error occurs, add it to the results for this section
|
||||
results.append({"header": header, "error": str(e)})
|
||||
continue
|
||||
|
||||
# Create a dictionary for this section
|
||||
section_result = {"header": header, "blocks": []}
|
||||
|
@ -49,9 +53,6 @@ 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