code: public final void updateTableHeads(final Element root) {
          final Iterable<Element> tableHeadRows; // Heads to fix
          Element table;  // HTML table
          Element thead;  // Table's head for wrapping
  
          checkNotNull(root, "Received a null pointer as root element");
  
          // Table rows with <th> tags in a <tbody>
          tableHeadRows = root.select("table > tbody > tr:has(th)");
          for (final Element row : tableHeadRows) {
              // Gets the row's table
              // The selector ensured the row is inside a tbody
              table = row.parent().parent();
  
              // Removes the row from its original position
              row.remove();
  
              // Creates a table header element with the row
              thead = new Element(Tag.valueOf("thead"), "");
              thead.appendChild(row);
              // Adds the head at the beginning of the table
              table.prependChild(thead);
          }
      }
docs: Corrects table headers by adding a {@code <thead>} section where missing.
  <p>
  This serves to fix an error with tables created by Doxia, which will add
  the header rows into the {@code <tbody>} element, instead on a {@code
  <thead>} element.
  
  @param root
  root element with tables to fix