Skip to content

Commit

Permalink
Handle packages that have an at symbol at the name
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Feb 4, 2024
1 parent e82aa3e commit e68f2bf
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*.*@(.+?)\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 e68f2bf

Please sign in to comment.