Skip to content

Commit 8700fdf

Browse files
committed
If coming from the CDN's mathjax/latest address, move to the explicit version (avoids CDN propagation issues when a new version is released).
1 parent 705548f commit 8700fdf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

unpacked/MathJax.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2943,7 +2943,9 @@ MathJax.Hub.Startup = {
29432943
if (KV) {STARTUP.params[unescape(KV[1])] = unescape(KV[2])}
29442944
}
29452945
}
2946-
CONFIG.root = scripts[i].src.replace(/(^|\/)[^\/]*(\?.*)?$/,'');
2946+
CONFIG.root = scripts[i].src.replace(/(^|\/)[^\/]*(\?.*)?$/,'')
2947+
.replace(/^(https?:\/\/(cdn.mathjax.org|c328740.ssl.cf1.rackcdn.com)\/mathjax\/)(latest)/,
2948+
"$1"+BASE.version+"-$3");
29472949
break;
29482950
}
29492951
}

0 commit comments

Comments
 (0)