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

(cherry picked from commit c1a02f9101)
This commit is contained in:
Adam Turner 2025-03-20 15:40:37 +00:00 committed by GitHub
parent caa73883f9
commit e1626c3b70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -143,7 +143,7 @@ def write_documents(self, _docnames: Set[str]) -> None:
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(