File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/language-core/lib/plugins Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -146,8 +146,10 @@ const plugin: VueLanguagePlugin = ctx => {
146
146
const { leftExpressionRange, leftExpressionText } = parseVForNode ( node ) ;
147
147
const { source } = node . parseResult ;
148
148
if ( leftExpressionRange && leftExpressionText && source . type === CompilerDOM . NodeTypes . SIMPLE_EXPRESSION ) {
149
- const start = leftExpressionRange . start ;
150
- const end = source . loc . start . offset + source . content . length ;
149
+ let start = leftExpressionRange . start ;
150
+ 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
153
addFormatCodes (
152
154
templateContent . slice ( start , end ) ,
153
155
start ,
You can’t perform that action at this time.
0 commit comments