Unverified Kaydet (Commit) db40cb50 authored tarafından Terry Jan Reedy's avatar Terry Jan Reedy Kaydeden (comit) GitHub

bpo-35087: Update idlelib help files for the current doc build. (GH-10162)

There is only one trivial change to idle.rst. Nearly all the changes to help.html are the elimination of chapter and section numbers on headers due to changes in the build system. help.py no longer requires header numbering.
üst aeb1be58
This diff is collapsed.
...@@ -126,7 +126,10 @@ class HelpParser(HTMLParser): ...@@ -126,7 +126,10 @@ class HelpParser(HTMLParser):
if tag in ['h1', 'h2', 'h3']: if tag in ['h1', 'h2', 'h3']:
self.indent(0) # clear tag, reset indent self.indent(0) # clear tag, reset indent
if self.show: if self.show:
self.toc.append((self.header, self.text.index('insert'))) indent = (' ' if tag == 'h3' else
' ' if tag == 'h2' else
'')
self.toc.append((indent+self.header, self.text.index('insert')))
elif tag in ['span', 'em']: elif tag in ['span', 'em']:
self.chartags = '' self.chartags = ''
elif tag == 'a': elif tag == 'a':
...@@ -142,11 +145,15 @@ class HelpParser(HTMLParser): ...@@ -142,11 +145,15 @@ class HelpParser(HTMLParser):
if self.show and not self.hdrlink: if self.show and not self.hdrlink:
d = data if self.pre else data.replace('\n', ' ') d = data if self.pre else data.replace('\n', ' ')
if self.tags == 'h1': if self.tags == 'h1':
self.hprefix = d[0:d.index(' ')] try:
if self.tags in ['h1', 'h2', 'h3'] and self.hprefix != '': self.hprefix = d[0:d.index(' ')]
if d[0:len(self.hprefix)] == self.hprefix: except ValueError:
d = d[len(self.hprefix):].strip() self.hprefix = ''
self.header += d if self.tags in ['h1', 'h2', 'h3']:
if (self.hprefix != '' and
d[0:len(self.hprefix)] == self.hprefix):
d = d[len(self.hprefix):]
self.header += d.strip()
self.text.insert('end', d, (self.tags, self.chartags)) self.text.insert('end', d, (self.tags, self.chartags))
......
Update idlelib help files for the current doc build. The main change is the
elimination of chapter-section numbers.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment