src/js/extensions/table/table.js
function _changeHtml(html, onChangeTable) {
  const $tempDiv = $(`<div>${html}</div>`);
  const $tables = $tempDiv.find('table');

  if ($tables.length) {
    $tables.get().forEach(tableElement => {
      const changedTableElement = onChangeTable(tableElement);

      $(tableElement).replaceWith(changedTableElement);
    });

    html = $tempDiv.html();
  }

  return html;
}
function _changeHtml(html, onChangeTable) {
  const $tempDiv = $(`<div>${html}</div>`);
  const $tables = $tempDiv.find('table');

  if ($tables.length) {
    $tables.get().forEach(tableElement => {
      const changedTableElement = onChangeTable(tableElement);

      $(tableElement).replaceWith(changedTableElement);
    });

    html = $tempDiv.html();
  }

  return html;
}
function _changeHtml ( html , onChangeTable ) { const $tempDiv = $ ( ` ${ html } ` ) ; const $tables = $tempDiv . find ( 'table' ) ; if ( $tables . length ) { $tables . get ( ) . forEach ( tableElement => { const changedTableElement = onChangeTable ( tableElement ) ; $ ( tableElement ) . replaceWith ( changedTableElement ) ; } ) ; html = $tempDiv . html ( ) ; } return html ; }
Change html by onChangeTable function.
@param {string} html - original html
@param {function} onChangeTable - function for changing html
@returns {string}
@private
Change html by onChangeTable function .