diff --git a/core/constants.js b/core/constants.js index 91e5ea3d..fa5ad6dc 100644 --- a/core/constants.js +++ b/core/constants.js @@ -55,7 +55,7 @@ const MessageResponse = { const Resource = { 'MAPPING_EXPRESSION': /\.map$/i, 'VERSION_EXPRESSION': /(?:\d{1,2}\.){1,3}\d{1,2}(?:-\d)?|latest/, - 'SINGLE_NUMBER_EXPRESSION': /^\D+@?\d.*$/, + 'SINGLE_NUMBER_EXPRESSION': /^\D+@?\d{1,2}\D*$/, 'MATHJAX': /\/\w.*(?:\d{1,2}\.){1,3}\d{1,2}(?:-\d)?\/|\/(mathjax\/)?latest\//, 'TINYMCE': /\/\w.*(?:\d{1,2}\.){1,3}\d{1,2}(?:-\d)?\//, 'VERSION_PLACEHOLDER': '{version}' diff --git a/core/request-analyzer.js b/core/request-analyzer.js index 684c0ae2..7f5370c0 100644 --- a/core/request-analyzer.js +++ b/core/request-analyzer.js @@ -151,7 +151,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel // Handle weird version expressions if (!versionNumber && Resource.SINGLE_NUMBER_EXPRESSION.test(channelPath)) { - versionNumber = channelPath.match(/\d/); + versionNumber = channelPath.match(/\d{1,2}/); resourcePattern = resourcePath.replaceAll(versionNumber, Resource.VERSION_PLACEHOLDER); versionNumber = [`${versionNumber}.0`]; } else { diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 3291b6b9..4a826760 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -25,6 +25,10 @@

New in LocalCDN:

+

Improved

+

Fixed