[3.11] gh-81479: For Help => IDLE Doc, stop double-spacing some lists. (GH-114168) (#114171)

This matches Firefox format.  Edge double-spaces non-simple
list but I think it looks worse.
(cherry picked from commit e07a400c31)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2024-01-17 07:35:35 +01:00 committed by GitHub
parent 644b4a1e87
commit 069cca7c2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,7 +102,7 @@ class HelpParser(HTMLParser):
if self.level > 0:
self.nested_dl = True
elif tag == 'li':
s = '\n* ' if self.simplelist else '\n\n* '
s = '\n* '
elif tag == 'dt':
s = '\n\n' if not self.nested_dl else '\n' # Avoid extra line.
self.nested_dl = False