code: @Override
      public void endDocument() throws SAXException {
          if ((rootClass == null || TOPIC_TOPIC.matches(rootClass)) && shouldAppendEndTag) {
              exportAnchors.add(currentExportAnchor);
              currentExportAnchor = null;
              shouldAppendEndTag = false;
          }
  
          getContentHandler().endDocument();
      }
docs: Clean up.