             c = line[col]
 
             # if stringDelimiter is set, then we are in a string
+            # Note that this works correctly even for triple quoted strings
             if stringDelimiter.length
                 if isEscaped
                     isEscaped = false

    lines = editor.getTextInBufferRange([[0,0], [row, col]]).split('\n')

    # A stack of [row, col] pairs describing where open brackets are
    bracketStack = PythonIndent.parseLines(lines)

    return unless bracketStack.length

    # bracketStack.pop()[1] is the column where the bracket was, so need to bump by one
    indentColumn = bracketStack.pop() + 1

    # Get tab length for context
    tabLength = editor.getTabLength()



  parseLines: (lines) ->
    # openBracketStack is an array of [row, col] indicating the location
    # of the opening bracket (square, curly, or parentheses)
    openBracketStack = []
    # closeBracketStack is an array of [rowOpen, rowClose] describing the
    # row where the bracket was opened, and the row where the bracket was closed.
    # The top of the stack is the last bracket-pair to be closed.
    closeBracketStack = []
    # if we are in a string, this tells us what character introduced the string
    # i.e., did this string start with ' or with "?
    stringDelimiter = []
