Skip to content

Commit

Permalink
Remove Math.min that is obsolte with state 6.5.1
Browse files Browse the repository at this point in the history
marijnh committed Jan 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 9f4b242 commit 2e4cc54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands.ts
Original file line number Diff line number Diff line change
@@ -188,7 +188,7 @@ function blankLine(context: Context[], state: EditorState, line: Line) {
let insert = ""
for (let i = 0, e = context.length - 2; i <= e; i++) {
insert += context[i].blank(i < e
? countColumn(line.text, 4, Math.min(line.text.length, context[i + 1].from)) - insert.length
? countColumn(line.text, 4, context[i + 1].from) - insert.length
: null, i < e)
}
return normalizeIndent(insert, state)

0 comments on commit 2e4cc54

Please sign in to comment.