mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Doc: Strip trailing whitespace in `pydoc_topics
` (#130492)
This commit is contained in:
parent
45bc120d45
commit
3f3e1c4095
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