def handle_endtag(self, tag):
if tag in self.stroke_after_elements:<EOL><INDENT>if self.text.endswith(self.stroke_text):<EOL><INDENT>self.text = self.text[:-len(self.stroke_text)]<EOL><DEDENT>else:<EOL><INDENT>if not self.text.endswith('<STR_LIT:\n>'):<EOL><INDENT>self.text += '<STR_LIT:\n>'<EOL><DEDENT>self.text += self.stroke_text<EOL><DEDENT><DEDENT>if tag == '<STR_LIT:a>':<EOL><INDENT>self.text += '<STR_LIT>'.format(len(self.links))<EOL><DEDENT>elif tag == '<STR_LIT>' and self.text and not self.text.endswith('<STR_LIT:\n>'):<EOL><INDENT>self.text += '<STR_LIT:\n>'<EOL><DEDENT>if tag == self.lasttag:<EOL><INDENT>self.lasttag = None<EOL><DEDENT>
Handles every end tag like e.g. </p>.