Skip to content

Commit

Permalink
move the hack
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Mar 27, 2024
1 parent 03637e9 commit d686082
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions packages/language-core/lib/generators/template.ts
Expand Up @@ -92,6 +92,10 @@ export function* generate(
};
}
}
if (typeof code !== 'string') {
code[3].structure = false;
code[3].format = false;
}
return code;
};
const _ts = codegenStack
Expand Down
6 changes: 0 additions & 6 deletions packages/language-core/lib/plugins/vue-tsx.ts
Expand Up @@ -39,12 +39,6 @@ const plugin: VueLanguagePlugin = ctx => {
const tsx = _tsx.generatedScript();
if (tsx) {
const [content, contentStacks] = ctx.codegenStack ? track([...tsx.codes], [...tsx.codeStacks]) : [[...tsx.codes], [...tsx.codeStacks]];
content.forEach(code => {
if (typeof code !== 'string') {
code[3].structure = false;
code[3].format = false;
}
});
embeddedFile.content = content;
embeddedFile.contentStacks = contentStacks;
embeddedFile.linkedCodeMappings = [...tsx.linkedCodeMappings];
Expand Down

0 comments on commit d686082

Please sign in to comment.