code: def handle_endtag(self, tag):
          
          if tag in self.stroke_after_elements:
              if self.text.endswith(self.stroke_text):
                  # Only add a stroke if there isn't already a stroke posted
                  # In this case, there was no content between the tags, so
                  # remove the starting stroke
                  self.text = self.text[:-len(self.stroke_text)]
              else:
                  # If there's no linebreak before the stroke, add one!
                  if not self.text.endswith('\n'):
                      self.text += '\n'
                  self.text += self.stroke_text
          if tag == 'a':
              # If it's a link, add a footnote
              self.text += '[{}]'.format(len(self.links))
          elif tag == 'br' and self.text and not self.text.endswith('\n'):
              # If it's a break, check if there's no break at the end of the
              # content. If there's none, add one!
              self.text += '\n'
          # Reset the lasttag, otherwise this parse can geht confused, if the
          # next element is not wrapped in a new tag.
          if tag == self.lasttag:
              self.lasttag = None
docs: Handles every end tag like e.g. </p>.