def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def looks_like_hash(sha):
    return bool(HASH_REGEX.match(sha))