code: private void removeHtmlComments(StringBuilder article) {
          int htmlCommentStart = article.indexOf("<!--");
          // Repeatedly loop while <!-- --> html comment markup still exists in
          // the document
          while (htmlCommentStart >= 0) {
              // Find the matching closing --> if it exists.  Some wikipedia text
              // is malformated, with no matching html comment end. so take no
              // action in this case.
              int htmlCommentEnd = article.indexOf("-->", htmlCommentStart);
              if (htmlCommentEnd > htmlCommentStart) 
                  article.delete(htmlCommentStart, htmlCommentEnd + 3);
              else 
                      break;
              // Search for the next <!-- if it exists
              htmlCommentStart = article.indexOf("<!--", htmlCommentStart);
          }
      }
docs: Removes HTML comments from the article text
  
  @param article The article text to clean.