mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
[3.13] Doc: Strip trailing whitespace in `pydoc_topics
` (GH-130492) (#130635)
(cherry picked from commit 3f3e1c4095
)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
parent
93b2bcb52d
commit
c6c2071cab
1 changed files with 2 additions and 1 deletions
|
@ -143,7 +143,8 @@ class PydocTopicsBuilder(TextBuilder):
|
|||
document.append(doc_ids[label_id])
|
||||
visitor = TextTranslator(document, builder=self)
|
||||
document.walkabout(visitor)
|
||||
self.topics[topic_label] = visitor.body
|
||||
body = "\n".join(map(str.rstrip, visitor.body.splitlines()))
|
||||
self.topics[topic_label] = body
|
||||
|
||||
def finish(self) -> None:
|
||||
topics_repr = "\n".join(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue