8000 Remove a kludge made unnecessary by an upstream change · codemirror/lang-python@1f8d660 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f8d660

Browse files
committed
Remove a kludge made unnecessary by an upstream change
1 parent 8b033f0 commit 1f8d660

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"dependencies": {
2929
"@codemirror/autocomplete": "^6.3.2",
3030
"@codemirror/language": "^6.0.0",
31-
"@lezer/python": "^1.0.0"
31+
"@lezer/python": "^1.1.4"
3232
},
3333
"devDependencies": {
3434
"@codemirror/buildhelper": "^0.1.0"

src/python.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ export {globalCompletion, localCompletionSource}
77

88
function indentBody(context: TreeIndentContext, node: SyntaxNode) {
99
let base = context.lineIndent(node.from)
10-
let line = context.lineAt(context.pos, -1), to = line.from + line.text.length
11-
// Don't consider blank, deindented lines at the end of the
12-
// block part of the block
13-
if (/^\s*($|#)/.test(line.text) &&
14-
context.node.to < to + 100 &&
15-
!/\S/.test(context.state.sliceDoc(to, context.node.to)) &&
16-
context.lineIndent(context.pos, -1) <= base)
17-
return null
1810
// A normally deindenting keyword that appears at a higher
1911
// indentation than the block should probably be handled by the next
2012
// level

0 commit comments

Comments
 (0)
0