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:
            continue
        token = tokenizer.get_token_at(doc, tol)
        if token is tokenizer.tokens.list:
            return True
        if s[0] not in ['\t ']:
            break
        pos = tol
