MCPcopy Index your code
hub / github.com/python/cpython / handle_endtag

Method handle_endtag

Lib/idlelib/help.py:128–146  ·  view source on GitHub ↗

Handle endtags in help.html.

(self, tag)

Source from the content-addressed store, hash-verified

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."

Callers

nothing calls this directly

Calls 3

indentMethod · 0.95
appendMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected