Skip to content

Commit 0442df9

Browse files
committed
Fix title parsing
1 parent 04b8a83 commit 0442df9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def parse_file(dst_path, fn):
149149
m = re.match('^===+\s*$', line)
150150
m2 = re.match('^---+\s*$', line)
151151
if m or m2:
152-
if prev_line and len(line) >= len(prev_line) and not title:
152+
if prev_line and len(line) >= 1+len(prev_line)//2 and not title:
153153
title = prev_line.strip()
154154
continue
155155

0 commit comments

Comments
 (0)