code: function(block) {
    if (block.last_line_blank) {
      return true;
    }
    if ((block.t == 'List' || block.t == 'ListItem') && block.children.length > 0) {
      return endsWithBlankLine(block.children[block.children.length - 1]);
    } else {
      return false;
    }
  }
docs: Returns true if block ends with a blank line, descending if needed into lists and sublists.