Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da79389

Browse files
committed
Word-wrap the list of cross-references.
1 parent 79c009d commit da79389

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/pydoc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,11 @@ def showtopic(self, topic):
13981398
parser.feed(document)
13991399
buffer = replace(buffer.getvalue(), '\xa0', ' ', '\n', '\n ')
14001400
pager(' ' + strip(buffer) + '\n')
1401-
if xrefs: self.output.write('\nRelated help topics: %s\n' % xrefs)
1401+
if xrefs:
1402+
buffer = StringIO.StringIO()
1403+
formatter.DumbWriter(buffer).send_flowing_data(
1404+
'Related help topics: ' + join(split(xrefs), ', ') + '\n')
1405+
self.output.write('\n%s\n' % buffer.getvalue())
14021406

14031407
def listmodules(self, key=''):
14041408
if key:

0 commit comments

Comments
 (0)