Skip to content

Commit ca45764

Browse files
committed
fix(toc_agent): increase bullet point length limit to 150
1 parent 28f10c7 commit ca45764

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

scripts/agent/toc_agent.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,9 @@ def validate_toc(toc):
5050
# Check for bullet points under numbered items
5151
elif re.match(r'^\s+-\s+.*$', line):
5252
# Check if this is a valid bullet point (indented with hyphen)
53-
if len(line) > 50: # Arbitrary limit for bullet point length
53+
if len(line) > 150: # Increased limit for bullet point length
5454
raise ValueError(f"Bullet point too long in line: {line}")
55-
else:
56-
# Non-empty line that doesn't match expected patterns
57-
if line.strip() and not re.match(r'^\d+\.\s+\[.*\]\(#.*\)$', line.strip()) and not re.match(r'^\s+-\s+.*$', line):
58-
raise ValueError(f"Invalid TOC line format: {line}")
59-
55+
6056
# Check if we have at least one numbered item
6157
if item_count == 0:
6258
raise ValueError("TOC must contain at least one numbered item")

0 commit comments

Comments
 (0)