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:
@@ -28,9 +28,9 @@ Slot tags for components with multiple content areas:
|
||||
```blade
|
||||
{{-- Slot tags are highlighted specially --}}
|
||||
<DataGrid>
|
||||
<#header>Name | Email | Status</#header>
|
||||
<#row><%= row.name %> | <%= row.email %></#row>
|
||||
<#empty>No data found</#empty>
|
||||
<Slot:header>Name | Email | Status</Slot:header>
|
||||
<Slot:row><%= row.name %> | <%= row.email %></Slot:row>
|
||||
<Slot:empty>No data found</Slot:empty>
|
||||
</DataGrid>
|
||||
```
|
||||
|
||||
@@ -65,7 +65,7 @@ The extension injects TextMate grammar rules into PHP and Blade files to:
|
||||
1. **Identify Component Tags**: Patterns match tags starting with uppercase letters
|
||||
2. **Highlight Component Names**: Apply distinctive coloring to component names
|
||||
3. **Preserve Blade Syntax**: Handle Blade expressions within component attributes
|
||||
4. **Support Slots**: Recognize and highlight `<#slotname>` syntax
|
||||
4. **Support Slots**: Recognize and highlight `<Slot:slotname>` syntax
|
||||
|
||||
## Supported Patterns
|
||||
|
||||
@@ -138,7 +138,7 @@ The grammar is injected into:
|
||||
### Pattern Matching
|
||||
- Component opening tags: `(<)([A-Z][\\w_]*)(?=\\s|>)`
|
||||
- Component closing tags: `(</)([A-Z][\\w_]*)(>)`
|
||||
- Slot tags: `(<#)(\\w+)(>)` and `(</#)(\\w+)(>)`
|
||||
- Slot tags: `(<Slot:)(\\w+)(>)` and `(</Slot:)(\\w+)(>)`
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
Reference in New Issue
Block a user