Skip to content

Commit ef92423

Browse files
ci(lint): auto-fix
1 parent 42355fc commit ef92423

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/language-core/lib/plugins/vue-template-inline-ts.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,12 @@ const plugin: VueLanguagePlugin = ctx => {
148148
if (leftExpressionRange && leftExpressionText && source.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
149149
let start = leftExpressionRange.start;
150150
let end = source.loc.start.offset + source.content.length;
151-
while (templateContent[start - 1] === ' ' || templateContent[start - 1] === '(') start--;
152-
while (templateContent[end] === ' ' || templateContent[end] === ')') end++;
151+
while (templateContent[start - 1] === ' ' || templateContent[start - 1] === '(') {
152+
start--;
153+
}
154+
while (templateContent[end] === ' ' || templateContent[end] === ')') {
155+
end++;
156+
}
153157
addFormatCodes(
154158
templateContent.slice(start, end),
155159
start,

0 commit comments

Comments
 (0)