From 521d4ee5136d013118c8faaf09678a82a51ae428 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 14 Apr 2015 16:24:27 -0400 Subject: [PATCH] Add roll-over from mathjax/latest to mathjax/x.y-latest for references to the CDN (to make sure that all files come from the same version). Resolves issue #1036. --- unpacked/MathJax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js index a8516038b..de1ff3211 100644 --- a/unpacked/MathJax.js +++ b/unpacked/MathJax.js @@ -3063,8 +3063,8 @@ MathJax.Hub.Startup = { } } CONFIG.root = scripts[i].src.replace(/(^|\/)[^\/]*(\?.*)?$/,'') - // convert rackspace to cdn.mathjax.org now that it supports https protocol - .replace(/^(https?:)\/\/[0-9a-f]+(-[0-9a-f]+)?.ssl.cf1.rackcdn.com\//,"$1//cdn.mathjax.org/"); + // convert mathjax/latest to mathjax/x.y-latest so that all files are the same version + .replace(/^(https?:\/\/cdn.mathjax.org\/mathjax\/)(latest)/,"$1"+BASE.version.split(/\./).slice(0,2).join(".")+"-$2"); BASE.Ajax.config.root = CONFIG.root; break; }