From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Thu, 20 Mar 2025 15:40:37 +0000 (+0000) Subject: [3.12] GH-121970: Extract `pydoc_topics` into a new extension (GH-131256) (#131512) X-Git-Tag: v3.12.10~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1626c3b70ed04e264d802a8ed83d70ca248fded;p=thirdparty%2FPython%2Fcpython.git [3.12] GH-121970: Extract `pydoc_topics` into a new extension (GH-131256) (#131512) (cherry picked from commit c1a02f9101f0b2d9dc7cfb4b8be5193e7459a906) --- diff --git a/Doc/tools/extensions/pydoc_topics.py b/Doc/tools/extensions/pydoc_topics.py index 86d929fdd902..4bb6b58ec06e 100644 --- a/Doc/tools/extensions/pydoc_topics.py +++ b/Doc/tools/extensions/pydoc_topics.py @@ -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(