'split a row of text with some code into a list of cells.'

def _split(self, row, marker):

    if self._row_has_unpaired_backticks(row):
        return row.split(marker)
    backtick_pattern = BacktickPattern((u'^' + BACKTICK_RE))
    elements = []
    current = u''
    i = 0
    while (i < len(row)):
        letter = row[i]
        if (letter == marker):
            if ((current != u'') or (len(elements) == 0)):
                elements.append(current)
            current = u''
        else:
            match = backtick_pattern.getCompiledRegExp().match(row[i:])
            if (not match):
                current += letter
            else:
                groups = match.groups()
                delim = groups[1]
                row_contents = groups[2]
                i += match.start(4)
                element = ((delim + row_contents) + delim)
                current += element
        i += 1
    elements.append(current)
    return elements
