Return the source of the current cell, as an array of lines
346234
def cell_source(cell):
    """"""
    source = cell.source
    if source == '':
        return ['']
    if source.endswith('\n'):
        return source.splitlines() + ['']
    return source.splitlines()
1043134
def get_l(self):
        """"""

        cell_left = CellBorders(self.cell_attributes,
                                *self.cell.get_left_key_rect())
        return cell_left.get_r()
87053
function(){
		if(this._info.num){ return this._info.num;}

		var bd = this.board;
		var pathsegs = [], passed = [];
		for(var id=0;id<bd.border.length;id++){ passed[id] = false;}
 
		var clist = bd.cell.filter(function(cell){ return cell.isNum();});
		for(var i=0;i<clist.length;i++){
			var cell = clist[i], adb = cell.adjborder;
			var dir4bd = [adb.top, adb.bottom, adb.left, adb.right];
			for(var a=0;a<4;a++){
				var firstbd = dir4bd[a];
				if(firstbd.isnull){ continue;}

				var pathseg = this.serachLineShapeInfo(cell,(a+1),passed);
				if(!!pathseg){ pathsegs.push(pathseg);}
			}
		}

		return (this._info.num = pathsegs);
	}
964776
def getcellslice(self, rownr, blc, trc, inc=[]):
        """"""
        return self._table.getcellslice(self._column, rownr, blc, trc, inc)
506335
def get_rb(self):
        """"""

        cell_right = CellBorders(self.cell_attributes,
                                 *self.cell.get_right_key_rect())
        return cell_right.get_b()
1158389
def get_cell(self, index, column):
        
        i = sorted_index(self._index, index) if self._sort else self._index.index(index)
        c = self._columns.index(column)
        return self._data[c][i]
357985
def go_to_previous_cell(self):
        """"""
        cursor = self.textCursor()
        cur_pos = prev_pos = cursor.position()

        if self.is_cell_separator(cursor):
            # Move to the previous cell
            cursor.movePosition(QTextCursor.PreviousBlock)
            cur_pos = prev_pos = cursor.position()

        while not self.is_cell_separator(cursor):
            # Move to the previous cell or the beginning of the current cell
            cursor.movePosition(QTextCursor.PreviousBlock)
            prev_pos = cur_pos
            cur_pos = cursor.position()
            if cur_pos == prev_pos:
                return

        self.setTextCursor(cursor)
130685
def get_rowspanned_columns(self):
        """"""
        spanned_columns = {}
        current_row_index = self._index
        current_row_cols = sum(cell.colspan for cell in self)
        prev_rows = iter(reversed(self.section[:current_row_index]))
        while current_row_cols < self.section.num_columns:
            row = next(prev_rows)
            min_rowspan = current_row_index - int(row._index)
            if row.maximum_rowspan > min_rowspan:
                for cell in (c for c in row if c.rowspan > min_rowspan):
                    col_index = int(cell.column_index)
                    spanned_columns[col_index] = cell.colspan
                    current_row_cols += cell.colspan
        return spanned_columns
1131377
public String getCellValue(int iRow, int iCol) {
        if (cells == null) return " ";
        return cells[iRow][iCol].valueAsString();
    }
673291
def find_cell_end(self, lines):
        """"""
        if self.metadata is None and not (self.cell_marker_end and self.end_code_re.match(lines[0])) \
                and paragraph_is_fully_commented(lines, self.comment, self.default_language):
            self.cell_type = 'markdown'
            for i, line in enumerate(lines):
                if _BLANK_LINE.match(line):
                    return i, i + 1, False
            return len(lines), len(lines), False

        if self.metadata is None:
            self.end_code_re = None
        elif not self.cell_marker_end:
            end_of_cell = self.metadata.get('endofcell', '-')
            self.end_code_re = re.compile('^' + self.comment + ' ' + end_of_cell + r'\s*$')

        return self.find_region_end(lines)
309086
public static String getCellContents(final Cell cell, final CellFormatter cellFormatter) {
        ArgUtils.notNull(cell, "cell");
        ArgUtils.notNull(cellFormatter, "cellFormatter");

        return cellFormatter.format(cell);

    }
520139
def find_cell_end(self, lines):
        """"""
        if self.metadata is None and lines[0].startswith("#'"):
            self.cell_type = 'markdown'
            for i, line in enumerate(lines):
                if not line.startswith("#'"):
                    if _BLANK_LINE.match(line):
                        return i, i + 1, False
                    return i, i, False

            return len(lines), len(lines), False

        if self.metadata and 'cell_type' in self.metadata:
            self.cell_type = self.metadata.pop('cell_type')
        else:
            self.cell_type = 'code'

        parser = StringParser(self.language or self.default_language)
        for i, line in enumerate(lines):
            # skip cell header
            if self.metadata is not None and i == 0:
                continue

            if parser.is_quoted():
                parser.read_line(line)
                continue

            parser.read_line(line)

            if self.start_code_re.match(line) or (self.markdown_prefix and line.startswith(self.markdown_prefix)):
                if i > 0 and _BLANK_LINE.match(lines[i - 1]):
                    if i > 1 and _BLANK_LINE.match(lines[i - 2]):
                        return i - 2, i, False
                    return i - 1, i, False
                return i, i, False

            if _BLANK_LINE.match(line):
                if not next_code_is_indented(lines[i:]):
                    if i > 0:
                        return i, i + 1, False
                    if len(lines) > 1 and not _BLANK_LINE.match(lines[1]):
                        return 1, 1, False
                    return 1, 2, False

        return len(lines), len(lines), False
146810
def lines(self):
        """"""
        if self._lines is None:
            with io.open(self.path, 'r', encoding='utf-8') as fh:
                self._lines = fh.read().split('\n')

        return self._lines
987714
def _code_cell(self, source):
        """"""
        input, output = self._prompt.to_cell(source)
        return {'cell_type': 'code',
                'input': input,
                'output': output}
1275145
function getCellsAtRow(
    opts: Options,
    // The table
    table: Block,
    rowIndex: number
): List<Block> {
    return table.nodes.get(rowIndex).nodes;
}
829475
def cells(self):
        

        n = 0

        for (order, cells) in self:
            n += len(cells)

        return n
422125
def merge_all_cells(cells):
    
    current = 0

    while len(cells) > 1:
        count = 0

        while count < len(cells):
            cell1 = cells[current]
            cell2 = cells[count]

            merge_direction = get_merge_direction(cell1, cell2)
            if not merge_direction == "NONE":
                merge_cells(cell1, cell2, merge_direction)

                if current > count:
                    current -= 1

                cells.pop(count)

            else:
                count += 1

        current += 1

        if current >= len(cells):
            current = 0

    return cells[0].text