Skip to content

Commit

Permalink
fix(language-core): update ast correctly on repeated v-for modifica…
Browse files Browse the repository at this point in the history
…tions (#4772)
  • Loading branch information
KazariEX authored Aug 31, 2024
1 parent 87a804a commit ea9bb02
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/language-core/lib/plugins/vue-template-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,16 @@ const plugin: VueLanguagePlugin = ({ modules }) => {
node.parseResult.key,
node.parseResult.index,
]) {
if (child && !tryUpdateNode(child)) {
return false;
if (child) {
if (!tryUpdateNode(child)) {
return false;
}
if (child.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
const content = child.content.trim();
if (content.startsWith('(') || content.endsWith(')')) {
return false;
}
}
}
}
for (const child of node.children) {
Expand Down

0 comments on commit ea9bb02

Please sign in to comment.