diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt index 184c7dd8..f8449d61 100644 --- a/THIRD_PARTY.txt +++ b/THIRD_PARTY.txt @@ -1327,6 +1327,9 @@ https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/output/HTML-CSS/fonts/T https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/output/HTML-CSS/imageFonts.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/output/HTML-CSS/jax.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js +https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff +https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/tex-mml-chtml.js https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.20.0/css/mdb.min.css https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.20.0/js/mdb.min.js https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.10.2/mdb.min.css diff --git a/core/constants.js b/core/constants.js index 1f852418..55961611 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\D+$/, + 'SINGLE_NUMBER_EXPRESSION': /^\D+@?\d.*$/, 'MATHJAX': /\/\w.*(?:\d{1,2}\.){1,3}\d{1,2}(?:-\d)?\/|\/(mathjax\/)?latest\//, 'VERSION_PLACEHOLDER': '{version}' }; @@ -398,6 +398,12 @@ const MathJaxFiles = { 'jax/output/HTML-CSS/jax.js': true, }; +const MathJax3Files = { + 'es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff': true, + 'es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff': true, + 'es5/tex-mml-chtml.js': true, + +}; /** * To block bad resources, e.g. fingerprint * diff --git a/core/mappings.js b/core/mappings.js index 8ac7a0ff..0353dccc 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -598,6 +598,7 @@ mappings.cdn = { 'npm-modernizr@{version}/modernizr.': resources.modernizr, 'npm-modernizr@{version}/modernizr.min.': resources.modernizr, 'markdown-it@{version}/dist/markdown-it.': resources.markdownIt, + 'mathjax@{version}/es5/': resources.mathJax, 'moment@{version}/moment.': resources.moment, 'moment@{version}/moment.min.': resources.moment, 'mootools@{version}/lib/mootools-core-{version}-server.': resources.mootools, diff --git a/core/request-analyzer.js b/core/request-analyzer.js index 08e88053..647a78df 100644 --- a/core/request-analyzer.js +++ b/core/request-analyzer.js @@ -242,7 +242,10 @@ requestAnalyzer._getPathOfBundle = function (initiator, channelHost, channelPath let filename = channelPath.split('/').pop(); if (bundle === 'MathJax (Bundle)' && filename !== 'MathJax.js') { filename = channelPath.replace(Resource.MATHJAX, ''); - if (!MathJaxFiles[filename]) { + if (filename.startsWith('/npm/mathjax@3')) { + filename = filename.replace('/npm/mathjax@3/', ''); + } + if (!MathJaxFiles[filename] && !MathJax3Files[filename]) { console.warn(`${LogString.PREFIX} ${LogString.MISSING_RESOURCE} ${channelHost + channelPath}`); log.append(initiator, channelHost + channelPath, '-', true); return { diff --git a/modules/internal/targets.js b/modules/internal/targets.js index 016c789b..c5cccbe3 100644 --- a/modules/internal/targets.js +++ b/modules/internal/targets.js @@ -306,6 +306,7 @@ targets.setLastVersion = function (type, version) { } if (type.startsWith('/materialize/1.')) return '1.0.0'; if (type.startsWith('/mathjax/2.') || type.startsWith('/mathjax/latest')) return '2.7.5'; + if (type.startsWith('/mathjax/3.')) return '3.2.0'; if (type.startsWith('/mdb-ui-kit/3.')) return '3.10.2'; if (type.startsWith('/mobile/1.')) return '1.4.5'; if (type.startsWith('/Modaal/0.')) return '0.4.4'; diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 2058d7b3..33341fe5 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -66,6 +66,7 @@
  • showdown v2.0.3 (#888)
  • docsify v4.12.2 (#890)
  • docsify-themeable v0.8.6 (#890)
  • +
  • MathJax v3.2.0 (#899)
  • Fixed