Lines 304-313
Link Here
|
304 |
# Extract the first sentence. |
304 |
# Extract the first sentence. |
305 |
for child in node: |
305 |
for child in node: |
306 |
if isinstance(child, docutils.nodes.Text): |
306 |
if isinstance(child, docutils.nodes.Text): |
307 |
m = self._SUMMARY_RE.match(child.data) |
307 |
data = child.astext() |
|
|
308 |
m = self._SUMMARY_RE.match(data) |
308 |
if m: |
309 |
if m: |
309 |
summary_pieces.append(docutils.nodes.Text(m.group(1))) |
310 |
summary_pieces.append(docutils.nodes.Text(m.group(1))) |
310 |
other = child.data[m.end():] |
311 |
other = data[m.end():] |
311 |
if other and not other.isspace(): |
312 |
if other and not other.isspace(): |
312 |
self.other_docs = True |
313 |
self.other_docs = True |
313 |
break |
314 |
break |
Lines 488-498
Link Here
|
488 |
# Remove the separating ":", if present |
489 |
# Remove the separating ":", if present |
489 |
if (len(fbody[0]) > 0 and |
490 |
if (len(fbody[0]) > 0 and |
490 |
isinstance(fbody[0][0], docutils.nodes.Text)): |
491 |
isinstance(fbody[0][0], docutils.nodes.Text)): |
491 |
child = fbody[0][0] |
492 |
content = fbody[0][0].astext() |
492 |
if child.data[:1] in ':-': |
493 |
if content[:1] in ':-': |
493 |
child.data = child.data[1:].lstrip() |
494 |
fbody[0][0] = docutils.nodes.Text(content[1:].lstrip()) |
494 |
elif child.data[:2] in (' -', ' :'): |
495 |
elif content[:2] in (' -', ' :'): |
495 |
child.data = child.data[2:].lstrip() |
496 |
fbody[0][0] = docutils.nodes.Text(content[2:].lstrip()) |
496 |
|
497 |
|
497 |
# Wrap the field body, and add a new field |
498 |
# Wrap the field body, and add a new field |
498 |
self._add_field(tagname, arg, fbody) |
499 |
self._add_field(tagname, arg, fbody) |