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

Doc/tools/extensions/pydoc_topics.py

index 0f3dfacd4f2f87cc43460d54af977d483c528232..01efbba628324f8d7f218ff9b52627b6f5435f92 100644 (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(