code: public final void fixAnchorLinks(final Element root) {
          String ref;         // Value of the href attribute
  
          checkNotNull(root, "Received a null pointer as root element");
  
          // Anchors
          for (final Element anchor : root.getElementsByTag("a")) {
              // If the attribute doesn't exist then the ref will be an empty
              // string
              ref = anchor.attr("href");
  
              if ((!ref.isEmpty()) && (ref.substring(0, 1).equals("#"))) {
                  anchor.attr("href",
                          ref.toLowerCase().replaceAll(ID_INVALID_REGEX, ""));
              }
          }
      }
docs: Fixes links to anchors in the same page.
  <p>
  Any link such as {@code <a href=\"#An_Internal.Link\">A link</a>} will be
  transformed into {@code <a href=\"#aninternallink\">A link</a>}.
  <p>
  The href value will receive the following modifications, only if it is an
  internal link:
  <ul>
  <li>Text will be set to lower case</li>
  <li>Underscores will be removed</li>
  <li>Points will be removed</li>
  <li>Empty spaces will be removed</li>
  </ul>
  
  @param root
  root element with anchors to fix