You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
When the expression in if, def or other block is spanning multiple lines the indent is too deep. It should be one level of indentation (for Python usually 4 spaces or tab) but it is as many spces as to match the position of the colon:
deftest(x,
y): # press enter here, see indent is too deep (fail!)
or
if (xandy): # press enter here, see indent is too deep (fail!)
This does not happen (i.e. works as expected) for single-line statments:
deftest(x, y): # press enter here, see indent is one level deep (ok)
Describe the issue
When the expression in
if,defor other block is spanning multiple lines the indent is too deep. It should be one level of indentation (for Python usually 4 spaces or tab) but it is as many spces as to match the position of the colon:or
This does not happen (i.e. works as expected) for single-line statments:
Browser and platform
Edge and Firefox
Reproduction link
https://codemirror.net/try/?c=aW1wb3J0IHtiYXNpY1NldHVwLCBFZGl0b3JWaWV3fSBmcm9tICJjb2RlbWlycm9yIgppbXBvcnQge3B5dGhvbn0gZnJvbSAiQGNvZGVtaXJyb3IvbGFuZy1weXRob24iCgpuZXcgRWRpdG9yVmlldyh7CiAgZG9jOiAiZGVmIHRlc3QoeCxcbiAgICAgICAgIHkpOiAjIHByZXNzIGVudGVyIGhlcmUsIHNlZSBpbmRlbnQgdG9vIGRlZXAgKHNob3VsZCBiZSA0IHNwYWNlcyBidXQgaXMgMTEpXG4iLAogIGV4dGVuc2lvbnM6IFtiYXNpY1NldHVwLCBweXRob24oKV0sCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5Cn0pCg==