/**
 *
 * @param tableNode
 * @example
 */
export function hasMergedCell(tableNode) {
  let hasSpan = false;
  tableNode.descendants(node => {
    if (node.type.name === 'tableRow') {
      return true;
    }
    const {
      colspan,
      rowspan
    } = node.attrs;
    if (colspan > 1 || rowspan > 1) {
      hasSpan = true;
    }
    return false;
  });
  return hasSpan;
}