Skip to content

Commit

Permalink
Merge pull request #45 from benholmen/bmh/add-blade-livewire-support
Browse files Browse the repository at this point in the history
Add support for Blade and Livewire components
  • Loading branch information
codingyu authored Dec 8, 2021
2 parents ba89988 + 45d098c commit afeb78e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"laravel_goto_view.regex": {
"type": "string",
"default": "(?<=view\\(|@include\\(|@extends\\(|@component\\(|Inertia::render\\()(['\"])[^'\"]*\\1",
"default": "(?<=view\\(['\"]|@include\\(['\"]|@extends\\(['\"]|@component\\(['\"]|Inertia::render\\(['\"]|\\<)(\\<x-|\\<livewire:|[^'\" \\/>]+)",
"description": "Custom regex for matching strings"
},
"laravel_goto_view.folders": {
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function getFilePaths(text: string, document: TextDocument) {
let workspaceFolder = workspace.getWorkspaceFolder(document.uri).uri.fsPath;
let config = workspace.getConfiguration('laravel_goto_view');
let paths = scanViewPaths(workspaceFolder, config);
let file = text.replace(/\"|\'/g, '').replace(/\./g, '/').split('::');
let file = text.replace(/\"|\'/g, '').replace('x-', 'components.').replace('livewire:', 'livewire.').replace(/\./g, '/').split('::');
let result = [];

for (let item in paths) {
Expand Down

0 comments on commit afeb78e

Please sign in to comment.