PY-14408 PythonIndentingProcessor includes tabs inside PsiWhitespace elements

Also I partially reverted previous fix in PyBlock#isWhitespaceLineBreaks,
because current approach is more general and that workaround is no longer
needed (multiple whitespaces are collapsed into single element as in other
languages).
This commit is contained in:
Mikhail Golubev
2015-01-28 13:11:03 +03:00
parent 9cf35e4acd
commit 186f1fe5af
5 changed files with 40 additions and 14 deletions
@@ -0,0 +1,3 @@
x = {
'foo': 42,
}
@@ -0,0 +1,20 @@
PyFile:TabInsideContinuationIndent.py
PyAssignmentStatement
PyTargetExpression: x
PsiElement(Py:IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(Py:EQ)('=')
PsiWhiteSpace(' ')
PyDictLiteralExpression
PsiElement(Py:LBRACE)('{')
PsiWhiteSpace('\n\t')
PyKeyValueExpression
PyStringLiteralExpression: foo
PsiElement(Py:SINGLE_QUOTED_STRING)(''foo'')
PsiElement(Py:COLON)(':')
PsiWhiteSpace(' ')
PyNumericLiteralExpression
PsiElement(Py:INTEGER_LITERAL)('42')
PsiElement(Py:COMMA)(',')
PsiWhiteSpace('\n')
PsiElement(Py:RBRACE)('}')