Skip to content

Commit 8d42c5b

Browse files
committed
isCont types + lineInfo.scope + lineInfo.line
1 parent 33d97af commit 8d42c5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib_src/misc/blocks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ function isStringEnd(lineInfo: LineInfo) {
3737
const scope = lineInfo.scope.join(" ")
3838
return /\bstring\.multiline\.end\b/.test(scope) || (/\bstring\.end\b/.test(scope) && /\bbacktick\b/.test(scope))
3939
}
40-
function isCont({ line, scope }) {
41-
scope = scope.join(" ")
40+
function isCont(lineInfo: LineInfo) {
41+
const scope = lineInfo.scope.join(" ")
4242
if (/\bstring\b/.test(scope) && !/\bpunctuation\.definition\.string\b/.test(scope)) {
4343
return true
4444
}
4545

46-
return line.match(/^(else|elseif|catch|finally)\b/)
46+
return lineInfo.line.match(/^(else|elseif|catch|finally)\b/)
4747
}
4848
function isStart(lineInfo) {
4949
return !(/^\s/.test(lineInfo.line) || isBlank(lineInfo) || isEnd(lineInfo) || isCont(lineInfo))

0 commit comments

Comments
 (0)