Migrate jqhtml slot syntax from <#name> to <Slot:name>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
8
node_modules/@jqhtml/vscode-extension/out/definitionProvider.js
generated
vendored
8
node_modules/@jqhtml/vscode-extension/out/definitionProvider.js
generated
vendored
@@ -71,11 +71,11 @@ class JqhtmlDefinitionProvider {
|
||||
}
|
||||
// IMPORTANT: Check for slot syntax BEFORE extracting word
|
||||
// This prevents slot names from being treated as component names
|
||||
// Check if we're in a slot tag by looking for <# or </# before cursor
|
||||
// Check if we're in a slot tag by looking for <Slot: or </Slot: before cursor
|
||||
const beforeCursor = line.substring(0, position.character);
|
||||
if (beforeCursor.match(/<\/?#\s*[A-Z][A-Za-z0-9_]*$/)) {
|
||||
if (beforeCursor.match(/<\/?Slot:\s*[A-Z][A-Za-z0-9_]*$/)) {
|
||||
// We're in a slot tag - extract the full slot name from the line
|
||||
const slotNameMatch = line.match(/<\/?#\s*([A-Z][A-Za-z0-9_]*)/);
|
||||
const slotNameMatch = line.match(/<\/?Slot:\s*([A-Z][A-Za-z0-9_]*)/);
|
||||
if (slotNameMatch) {
|
||||
const slotName = slotNameMatch[1];
|
||||
console.log(`JQHTML: Detected slot tag syntax for slot: ${slotName}`);
|
||||
@@ -492,7 +492,7 @@ class JqhtmlDefinitionProvider {
|
||||
return undefined;
|
||||
}
|
||||
/**
|
||||
* Handle goto definition for slot tags (<#SlotName>)
|
||||
* Handle goto definition for slot tags (<Slot:SlotName>)
|
||||
*
|
||||
* IMPLEMENTATION SCOPE (Narrow, for now):
|
||||
* - Handles direct extends="ComponentName" on <Define:> tags
|
||||
|
||||
Reference in New Issue
Block a user