Skip to content

Commit

Permalink
Merge pull request openwebwork#2596 from drgrice1/remove-old-mathquil…
Browse files Browse the repository at this point in the history
…l-asset-case

Remove the special case in the `getThirdPartyAssetURL` method for MathQuill.
  • Loading branch information
pstaabp authored Nov 12, 2024
2 parents 0448efb + 917732a commit 378c4ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/WeBWorK/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,13 @@ sub readJSON ($fileName) {
sub getThirdPartyAssetURL ($file, $dependencies, $baseURL, $useCDN = 0) {
for (keys %$dependencies) {
if ($file =~ /^node_modules\/$_\/(.*)$/) {
if ($useCDN && $1 !~ /mathquill/) {
if ($useCDN) {
return
"https://cdn.jsdelivr.net/npm/$_\@"
. substr($dependencies->{$_}, 1) . '/'
. ($1 =~ s/(?:\.min)?\.(js|css)$/.min.$1/gr);
} else {
return "$baseURL/$file?version=" . ($dependencies->{$_} =~ s/#/@/gr);
return "$baseURL/$file?version=$dependencies->{$_}";
}
}
}
Expand Down

0 comments on commit 378c4ed

Please sign in to comment.