mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(backend): fix per-block comparison in check_docs_in_sync
The regex captured content up to but excluding --- separator, while expected_block_content includes ---. This caused all blocks to be falsely flagged as mismatched. Now includes --- in the capture. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -663,8 +663,9 @@ def check_docs_in_sync(output_dir: Path, blocks: list[BlockDoc]) -> bool:
|
||||
content_parts.append(expected_block_content)
|
||||
|
||||
# Check if this specific block's section exists and matches
|
||||
# Include the --- separator to match generate_block_markdown output
|
||||
block_pattern = (
|
||||
rf"(?:^|\n)(##? {re.escape(block.name)}\s*\n.*?)(?=\n---|\Z)"
|
||||
rf"(?:^|\n)(##? {re.escape(block.name)}\s*\n.*?\n---\n)"
|
||||
)
|
||||
block_match = re.search(block_pattern, existing_content, re.DOTALL)
|
||||
if not block_match:
|
||||
|
||||
Reference in New Issue
Block a user