File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
packages/language-core/lib/plugins Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -88,14 +88,17 @@ const plugin: VueLanguagePlugin = ({ vueCompilerOptions }) => {
88
88
return sfc ;
89
89
90
90
function transformRange ( block : SFCBlock ) {
91
- block . loc . start . offset = - 1 ;
92
- block . loc . end . offset = - 1 ;
93
- for ( const [ start ] of file2VueSourceMap . toSourceLocation ( block . loc . start . offset ) ) {
94
- block . loc . start . offset = start ;
91
+ const { start, end } = block . loc ;
92
+ const startOffset = start . offset ;
93
+ const endOffset = end . offset ;
94
+ start . offset = - 1 ;
95
+ end . offset = - 1 ;
96
+ for ( const [ offset ] of file2VueSourceMap . toSourceLocation ( startOffset ) ) {
97
+ start . offset = offset ;
95
98
break ;
96
99
}
97
- for ( const [ end ] of file2VueSourceMap . toSourceLocation ( block . loc . end . offset ) ) {
98
- block . loc . end . offset = end ;
100
+ for ( const [ offset ] of file2VueSourceMap . toSourceLocation ( endOffset ) ) {
101
+ end . offset = offset ;
99
102
break ;
100
103
}
101
104
}
You can’t perform that action at this time.
0 commit comments