We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1def89a commit 5836a73Copy full SHA for 5836a73
pep_sphinx_extensions/generate_rss.py
@@ -59,14 +59,12 @@ def pep_abstract(document: nodes.document) -> str:
59
if title_node is None:
60
continue
61
62
- para_node = None
63
if title_node.astext() == "Abstract":
64
- para_node = node.next_node(nodes.paragraph)
65
- elif title_node.astext() == "Introduction":
66
67
-
68
- if para_node:
69
- introduction = para_node.astext().strip().replace("\n", " ")
+ if (para_node := node.next_node(nodes.paragraph)) is not None:
+ return para_node.astext().strip().replace("\n", " ")
+ return ""
+ if title_node.astext() == "Introduction":
+ introduction = node.next_node(nodes.paragraph).astext().strip().replace("\n", " ")
70
71
return introduction
72
0 commit comments