Skip to content

Commit ad2a0bd

Browse files
jiangying000yyx990803
authored andcommitted
perf(compiler-core): simplify advancePositionWithMutation (#564)
1 parent 9996d7a commit ad2a0bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/compiler-core/src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export function advancePositionWithMutation(
149149
pos.column =
150150
lastNewLinePos === -1
151151
? pos.column + numberOfCharacters
152-
: Math.max(1, numberOfCharacters - lastNewLinePos)
152+
: numberOfCharacters - lastNewLinePos
153153

154154
return pos
155155
}

0 commit comments

Comments
 (0)