Skip to content

Commit 52640ae

Browse files
committed
Add an indentation rule for member expressions
FIX: Add an indentation rule for member expressions. Closes 'codemirror/dev#1553
1 parent 3049f47 commit 52640ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/python.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,12 @@ export const pythonLanguage = LRLanguage.define({
7676
"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression": delimitedIndent({closing: ")"}),
7777
"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression": delimitedIndent({closing: "}"}),
7878
"ArrayExpression ArrayComprehensionExpression": delimitedIndent({closing: "]"}),
79+
MemberExpression: cx => cx.baseIndent + cx.unit,
7980
"String FormatString": () => null,
8081
Script: context => {
8182
let inner = innerBody(context)
8283
return (inner && indentBody(context, inner)) ?? context.continue()
83-
}
84+
},
8485
}),
8586

8687
foldNodeProp.add({

0 commit comments

Comments
 (0)