Skip to content

Commit 1233299

Browse files
committed
[python mode] Don't highlight comments with odd indentation as error
Closes codemirror#4276
1 parent 2701827 commit 1233299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/python/python.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
var lineOffset = stream.indentation();
8686
if (lineOffset > scopeOffset)
8787
pushPyScope(state);
88-
else if (lineOffset < scopeOffset && dedent(stream, state))
88+
else if (lineOffset < scopeOffset && dedent(stream, state) && stream.peek() != "#")
8989
state.errorToken = true;
9090
return null;
9191
} else {

0 commit comments

Comments
 (0)