Skip to content

Commit

Permalink
change regex for reading file-ext with numbers in
Browse files Browse the repository at this point in the history
  • Loading branch information
codekriss committed Apr 17, 2023
1 parent 56197cd commit e5f7b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/View/Components/MixBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct($manifestDirectory = '', $integrity = null, $crossor
->keys()
->groupBy(function ($key) {

preg_match('/\.(\D+)$/', $key, $matches);
preg_match('/\.([^\.]+)$/', $key, $matches);

return $matches[1];
});
Expand Down

2 comments on commit e5f7b51

@thomas-alrek
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hei @codekriss. Hva er grunnen til denne endringen? Har vi testet at dette ikke breaker andre steder denne pakken er i bruk?

@codekriss
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hei, grunnen til endringen er at den regex-en ikke klarer å lese filer med file-extensions med tall i. F. eks "woff2" filer. Testet regex-en på Industrivektoy-siden hvertfall

Please sign in to comment.