docs: def _pre_tidy(html):
      """ This method transforms a few things before tidy runs. When we get rid
          of tidy, this can go away. """
      tree = etree.fromstring(html, etree.HTMLParser())
      for el in tree.xpath('//u'):
          el.tag = 'em'
          c = el.attrib.get('class', '').split()
          if 'underline' not in c:
              c.append('underline')
              el.attrib['class'] = ' '.join(c)
  
      return tohtml(tree)