[3.13] GH-121970: Extract pydoc_topics into a new extension (GH-131256) (#131511)

(cherry picked from commit c1a02f9101)
This commit is contained in:
Adam Turner 2025-03-20 15:34:10 +00:00 committed by GitHub
parent 2b5feb1f9e
commit 26b04a16ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,7 +144,7 @@ class PydocTopicsBuilder(TextBuilder):
visitor = TextTranslator(document, builder=self)
document.walkabout(visitor)
body = "\n".join(map(str.rstrip, visitor.body.splitlines()))
self.topics[topic_label] = body
self.topics[topic_label] = body + "\n"
def finish(self) -> None:
topics_repr = "\n".join(