]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] GH-121970: Extract `pydoc_topics` into a new extension (GH-131256) (#131512)
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>
Thu, 20 Mar 2025 15:40:37 +0000 (15:40 +0000)
committerGitHub <noreply@github.com>
Thu, 20 Mar 2025 15:40:37 +0000 (15:40 +0000)
(cherry picked from commit c1a02f9101f0b2d9dc7cfb4b8be5193e7459a906)

Doc/tools/extensions/pydoc_topics.py

index 86d929fdd90252a5a04d93018555730ee091d891..4bb6b58ec06e02836742d790e6404f56a326b6f2 100644 (file)
@@ -143,7 +143,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(