Skip to content

Commit 6158221

Browse files
committed
Tweaked the author extraction to recognize short lines as paragraph ends, not only lines ending in '.' or ':'
- Legacy-Id: 12837
1 parent 9b23816 commit 6158221

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/utils/draft.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def _stripheaders(self):
196196
line = ""
197197
newpage = False
198198
sentence = False
199+
shortline = False
199200
blankcount = 0
200201
linecount = 0
201202
# two functions with side effects
@@ -262,14 +263,15 @@ def begpage(pages, page, newpage, line=None):
262263
sentence = True
263264
if re.search("[^ \t]", line):
264265
if newpage:
265-
if sentence:
266+
if sentence or shortline:
266267
stripped += [""]
267268
else:
268269
if blankcount:
269270
stripped += [""]*blankcount
270271
blankcount = 0
271272
sentence = False
272273
newpage = False
274+
shortline = len(line.strip()) < 18
273275
if re.search("[.:]$", line):
274276
sentence = True
275277
if re.search("^[ \t]*$", line):

0 commit comments

Comments
 (0)