Skip to content

Commit

Permalink
Another attempt at matching packages starting with at symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Feb 4, 2024
1 parent e68f2bf commit e81481c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Npm.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private function findPackagesFromCdnMatches(string $content)

private function findPackagesFromLocalMatches(string $content)
{
preg_match_all('/^Importmap::pin\([\'\"](.+?)[\'\"].*\)\;\s*\/\/\s*.*@(\d+\.\d+\.\d+.*?)\s+.*\r?$/m', $content, $matches);
preg_match_all('/^Importmap::pin\([\'\"](.+?)[\'\"].*\)\;\s*\/\/\s*[@.]*@(\d+\.\d+\.\d+.*?)\s+.*\r?$/m', $content, $matches);

if (count($matches) !== 3) {
return collect();
Expand Down

0 comments on commit e81481c

Please sign in to comment.