File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -50,13 +50,9 @@ def validate_toc(toc):
50
50
# Check for bullet points under numbered items
51
51
elif re .match (r'^\s+-\s+.*$' , line ):
52
52
# 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
54
54
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
+
60
56
# Check if we have at least one numbered item
61
57
if item_count == 0 :
62
58
raise ValueError ("TOC must contain at least one numbered item" )
You can’t perform that action at this time.
0 commit comments