MathJax v3.2.0 (#899)

This commit is contained in:
nobody 2022-03-15 17:12:14 +01:00
parent ea4463cea6
commit b2b30d625b
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
9 changed files with 18 additions and 2 deletions

View File

@ -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

View File

@ -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
*

View File

@ -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,

View File

@ -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 {

View File

@ -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';

View File

@ -66,6 +66,7 @@
<li>showdown v2.0.3 (<a href="https://codeberg.org/nobody/LocalCDN/issues/888">#888</a>)</li>
<li>docsify v4.12.2 (<a href="https://codeberg.org/nobody/LocalCDN/issues/890">#890</a>)</li>
<li>docsify-themeable v0.8.6 (<a href="https://codeberg.org/nobody/LocalCDN/issues/890">#890</a>)</li>
<li>MathJax v3.2.0 (<a href="https://codeberg.org/nobody/LocalCDN/issues/899">#899</a>)</li>
</ul>
<p>Fixed</p>
<ul>

File diff suppressed because one or more lines are too long