fix(service): parse text expressions in svelte control flow blocks#9103
fix(service): parse text expressions in svelte control flow blocks#9103
Conversation
🦋 Changeset detectedLatest commit: 566b592 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 WalkthroughAdds a patch changeset documenting a fix for issue Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@crates/biome_service/src/file_handlers/html.rs`:
- Around line 767-829: The each-block handling only parses opening_block.list()
but misses the optional key expression; update the SvelteEachBlock branch so
after obtaining opening_block (and parsing the list) also call
opening_block.item(), cast that item to SvelteEachAsKeyedItem
(SvelteEachAsKeyedItem::cast_ref), then if let Ok(key_expr) =
keyed_item.key().expression() call parse_text_expression(key_expr, cache,
biome_path, settings, file_source) and push the returned (content, doc_source)
into nodes (same as for list). Use the same parse_text_expression call pattern
and nodes.push((content.into(), doc_source)) so identifiers in the (key) are
embedded.
00c9713 to
04d6531
Compare
04d6531 to
566b592
Compare
Summary
Generated by kimi k2.5, but I overhauled the test it created by hand.
fixes #9098
Test Plan
added a new cli test
Docs