(doc, pos, tokenizer)
Returns True if pos is in list block
Returns True if pos is in list block
Returns True if pos is in list block
def is_list_block(doc, pos, tokenizer):
    '''Returns True if pos is in list block'''

    pos = doc.gettol(pos)
    while pos:
        pos -= 1
        tol = doc.gettol(pos)
        s = doc.gettext(tol, pos).rstrip()
        if not s:
            # skip blank line
            continue
        token = tokenizer.get_token_at(doc, tol)
        if token is tokenizer.tokens.list:
            return True

        if s[0] not in ['\t ']:  # check previous line if indended.
            break
        pos = tol
def is_list_block ( doc , pos , tokenizer ) : pos = doc . gettol ( pos ) while pos : pos -= 1 tol = doc . gettol ( pos ) s = doc . gettext ( tol , pos ) . rstrip ( ) if not s : # skip blank line continue token = tokenizer . get_token_at ( doc , tol ) if token is tokenizer . tokens . list : return True if s [ 0 ] not in [ '\t ' ] : # check previous line if indended. break pos = tol