Skip to content

Commit d6f2519

Browse files
fix(language-core): generate each interpolation into separate virtual code (#4165)
1 parent 0eccc7a commit d6f2519

File tree

11 files changed

+389
-278
lines changed

11 files changed

+389
-278
lines changed

packages/language-core/lib/generators/inlineCss.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import { forEachElementNode } from './template';
33
import { enableAllFeatures } from './utils';
44
import type { Code } from '../types';
55

6+
const codeFeatures = enableAllFeatures({
7+
format: false,
8+
structure: false,
9+
});
10+
611
export function* generate(templateAst: NonNullable<CompilerDOM.RootNode>): Generator<Code> {
712
for (const node of forEachElementNode(templateAst)) {
813
for (const prop of node.props) {
@@ -24,10 +29,7 @@ export function* generate(templateAst: NonNullable<CompilerDOM.RootNode>): Gener
2429
content,
2530
'template',
2631
prop.arg.loc.start.offset + start,
27-
enableAllFeatures({
28-
format: false,
29-
structure: false,
30-
}),
32+
codeFeatures,
3133
];
3234
yield ` }\n`;
3335
}

0 commit comments

Comments
 (0)