Skip to content

Commit 9ae7b90

Browse files
committed
Merged in changes from Yaco @2880.
- Legacy-Id: 2917
1 parent 265b94c commit 9ae7b90

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

ietf/utils/draft.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,20 +273,26 @@ def get_abstract(self):
273273
if self._abstract:
274274
return self._abstract
275275
abstract_re = re.compile('^(\s*)abstract', re.I)
276-
header_re = re.compile("^(\s*)(1\.|A\.|Appendix|Status of|Table of|Full Copyright|Copyright|Intellectual Property|Acknowled|Author|Index).*", re.I)
276+
header_re = re.compile("^(\s*)([0-9]+\.? |Appendix|Status of|Table of|Full Copyright|Copyright|Intellectual Property|Acknowled|Author|Index).*", re.I)
277277
begin = False
278278
abstract = []
279279
abstract_indent = 0
280+
look_for_header = False
280281
for line in self.lines:
281282
if not begin and abstract_re.match(line):
282283
begin=True
283284
abstract_indent = len(abstract_re.match(line).group(0))
284285
continue
285286
if begin:
286-
if header_re.match(line):
287-
break
288287
if not line and not abstract:
289288
continue
289+
if not line:
290+
look_for_header=True
291+
abstract.append(line)
292+
continue
293+
if look_for_header and header_re.match(line):
294+
break
295+
look_for_header = False
290296
abstract.append(line)
291297
abstract = '\n'.join(abstract)
292298
abstract = self._clean_abstract(abstract)

0 commit comments

Comments
 (0)