perf(compiler-core): simplify advancePositionWithMutation
(#564)
This commit is contained in:
parent
9996d7acbc
commit
ad2a0bde98
@ -149,7 +149,7 @@ export function advancePositionWithMutation(
|
|||||||
pos.column =
|
pos.column =
|
||||||
lastNewLinePos === -1
|
lastNewLinePos === -1
|
||||||
? pos.column + numberOfCharacters
|
? pos.column + numberOfCharacters
|
||||||
: Math.max(1, numberOfCharacters - lastNewLinePos)
|
: numberOfCharacters - lastNewLinePos
|
||||||
|
|
||||||
return pos
|
return pos
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user