Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pep_sphinx_extensions/generate_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@
continue

if title_node.astext() == "Abstract":
return node.next_node(nodes.paragraph).astext().strip().replace("\n", " ")
elif title_node.astext() == "Introduction":
if (para_node := node.next_node(nodes.paragraph)) is not None:
return para_node.astext().strip().replace("\n", " ")
return ""
if title_node.astext() == "Introduction":

Check warning on line 66 in pep_sphinx_extensions/generate_rss.py

View check run for this annotation

Codecov / codecov/patch

pep_sphinx_extensions/generate_rss.py#L63-L66

Added lines #L63 - L66 were not covered by tests
introduction = node.next_node(nodes.paragraph).astext().strip().replace("\n", " ")

return introduction
Expand Down