File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
packages/compiler-sfc/__tests__ Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -255,5 +255,22 @@ describe('CSS vars injection', () => {
255
255
)
256
256
expect ( cssVars ) . toMatchObject ( [ `count.toString(` , `xxx` ] )
257
257
} )
258
+
259
+ // #7759
260
+ test ( 'It should correctly parse the case where there is no space after the script tag' , ( ) => {
261
+ const { content } = compileSFCScript (
262
+ `<script setup>import { ref as _ref } from 'vue';
263
+ let background = _ref('red')
264
+ </script>
265
+ <style>
266
+ label {
267
+ background: v-bind(background);
268
+ }
269
+ </style>`
270
+ )
271
+ expect ( content ) . toMatch (
272
+ `export default {\n setup(__props, { expose }) {\n expose();\n\n_useCssVars(_ctx => ({\n "xxxxxxxx-background": (_unref(background))\n}))`
273
+ )
274
+ } )
258
275
} )
259
276
} )
You can’t perform that action at this time.
0 commit comments