Handle endtags in help.html.
(self, tag)
| 126 | self.prevtag = (True, tag) |
| 127 | |
| 128 | def handle_endtag(self, tag): |
| 129 | "Handle endtags in help.html." |
| 130 | if tag in ['h1', 'h2', 'h3']: |
| 131 | assert self.level == 0 |
| 132 | indent = (' ' if tag == 'h3' else |
| 133 | ' ' if tag == 'h2' else |
| 134 | '') |
| 135 | self.toc.append((indent+self.header, self.text.index('insert'))) |
| 136 | self.tags = '' |
| 137 | elif tag in ['span', 'em']: |
| 138 | self.chartags = '' |
| 139 | elif tag == 'a': |
| 140 | self.hdrlink = False |
| 141 | elif tag == 'pre': |
| 142 | self.pre = False |
| 143 | self.tags = '' |
| 144 | elif tag in ['ul', 'dd', 'ol']: |
| 145 | self.indent(-1) |
| 146 | self.prevtag = (False, tag) |
| 147 | |
| 148 | def handle_data(self, data): |
| 149 | "Handle date segments in help.html." |