From 8700fdf0986d02932a8f3cf246bd7548e378b0f7 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 16 Nov 2013 20:22:19 -0500 Subject: [PATCH] If coming from the CDN's mathjax/latest address, move to the explicit version (avoids CDN propagation issues when a new version is released). --- unpacked/MathJax.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js index e0095fc33..409a3e843 100644 --- a/unpacked/MathJax.js +++ b/unpacked/MathJax.js @@ -2943,7 +2943,9 @@ MathJax.Hub.Startup = { if (KV) {STARTUP.params[unescape(KV[1])] = unescape(KV[2])} } } - CONFIG.root = scripts[i].src.replace(/(^|\/)[^\/]*(\?.*)?$/,''); + CONFIG.root = scripts[i].src.replace(/(^|\/)[^\/]*(\?.*)?$/,'') + .replace(/^(https?:\/\/(cdn.mathjax.org|c328740.ssl.cf1.rackcdn.com)\/mathjax\/)(latest)/, + "$1"+BASE.version+"-$3"); break; } }