Switch to ACE editor
This commit is contained in:
parent
d5fddb26dd
commit
efada1b26c
@ -1,5 +1,5 @@
|
|||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
#Date Sun Sep 15 2013 15:14:20
|
#Date Sun Sep 15 2013 17:46:00
|
||||||
|
|
||||||
CACHE:
|
CACHE:
|
||||||
index.html
|
index.html
|
||||||
|
126
res-min/main.js
126
res-min/main.js
@ -11935,7 +11935,7 @@ define("config", function() {}), define("storage", [ "underscore", "utils" ], fu
|
|||||||
maxWidth: 960,
|
maxWidth: 960,
|
||||||
defaultContent: "\n\n\n> Written with [StackEdit](" + MAIN_URL + ").",
|
defaultContent: "\n\n\n> Written with [StackEdit](" + MAIN_URL + ").",
|
||||||
commitMsg: "Published with " + MAIN_URL,
|
commitMsg: "Published with " + MAIN_URL,
|
||||||
template: [ "<!DOCTYPE html>\n", "<html>\n", "<head>\n", '<meta charset="utf-8">\n', "<title><%= documentTitle %></title>\n", '<link rel="stylesheet" href="', MAIN_URL, 'css/main-min.css" />\n', '<script type="text/javascript" src="', MAIN_URL, 'lib/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>\n', "</head>\n", '<body><div class="container"><%= documentHTML %></div></body>\n', "</html>" ].join(""),
|
template: [ "<!DOCTYPE html>\n", "<html>\n", "<head>\n", '<meta charset="utf-8">\n', "<title><%= documentTitle %></title>\n", '<link rel="stylesheet" href="', MAIN_URL, 'res-min/themes/default.css" />\n', '<script type="text/javascript" src="', MAIN_URL, 'lib/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>\n', "</head>\n", '<body><div class="container"><%= documentHTML %></div></body>\n', "</html>" ].join(""),
|
||||||
sshProxy: SSH_PROXY_URL,
|
sshProxy: SSH_PROXY_URL,
|
||||||
extensionSettings: {}
|
extensionSettings: {}
|
||||||
};
|
};
|
||||||
@ -17817,15 +17817,23 @@ if (hljs.LANGUAGES.glsl = function(e) {
|
|||||||
}, c;
|
}, c;
|
||||||
}), define("text!html/mathJaxSettingsBlock.html", [], function() {
|
}), define("text!html/mathJaxSettingsBlock.html", [], function() {
|
||||||
return '<p>Allows StackEdit to interpret LaTeX mathematical expressions.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-lg-4 control-label"\n for="input-mathjax-config-tex">TeX configuration</label>\n <div class="col-lg-7">\n <input type="text" id="input-mathjax-config-tex" class="form-control">\n </div>\n </div>\n <div class="form-group">\n <label class="col-lg-4 control-label"\n for="input-mathjax-config-tex2jax">tex2jax configuration</label>\n <div class="col-lg-7">\n <input type="text" id="input-mathjax-config-tex2jax" class="form-control">\n </div>\n </div>\n</div>\n<span class="help-block pull-right"><a target="_blank" href="http://docs.mathjax.org/en/latest/options/index.html">More info</a></span>';
|
return '<p>Allows StackEdit to interpret LaTeX mathematical expressions.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-lg-4 control-label"\n for="input-mathjax-config-tex">TeX configuration</label>\n <div class="col-lg-7">\n <input type="text" id="input-mathjax-config-tex" class="form-control">\n </div>\n </div>\n <div class="form-group">\n <label class="col-lg-4 control-label"\n for="input-mathjax-config-tex2jax">tex2jax configuration</label>\n <div class="col-lg-7">\n <input type="text" id="input-mathjax-config-tex2jax" class="form-control">\n </div>\n </div>\n</div>\n<span class="help-block pull-right"><a target="_blank" href="http://docs.mathjax.org/en/latest/options/index.html">More info</a></span>';
|
||||||
}), define("extensions/mathJax", [ "utils", "classes/Extension", "text!html/mathJaxSettingsBlock.html", "mathjax" ], function(utils, Extension, mathJaxSettingsBlockHTML) {
|
}), define("text!libs/mathjax_config.js", [], function() {
|
||||||
function b(e, t, n) {
|
return 'MathJax.Hub.Config({\n "HTML-CSS": {\n preferredFont: "TeX",\n availableFonts: [\n "STIX",\n "TeX"\n ],\n linebreaks: {\n automatic: true\n },\n EqnChunk: 10,\n imageFont: null\n },\n tex2jax: <%= tex2jax || \'{ inlineMath: [["$","$"],["\\\\\\\\\\\\\\\\(","\\\\\\\\\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\\\\\[","\\\\\\\\]"]], processEscapes: true }\' %>,\n TeX: $.extend({\n noUndefined: {\n attributes: {\n mathcolor: "red",\n mathbackground: "#FFEEEE",\n mathsize: "90%"\n }\n },\n Safe: {\n allow: {\n URLs: "safe",\n classes: "safe",\n cssIDs: "safe",\n styles: "safe",\n fontsize: "all"\n }\n }\n }, <%= tex %>),\n messageStyle: "none"\n});\n';
|
||||||
var r = k.slice(e, t + 1).join("").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
}), require([ "settings", "text!libs/mathjax_config.js" ], function(e, t) {
|
||||||
for (h.Browser.isMSIE && (r = r.replace(/(%[^\n]*)\n/g, "$1<br/>\n")); t > e; ) k[t] = "",
|
var n = document.createElement("script");
|
||||||
|
n.type = "text/x-mathjax-config", n.innerHTML = _.template(t, {
|
||||||
|
tex: e.extensionSettings.mathJax ? e.extensionSettings.mathJax.tex : "undefined",
|
||||||
|
tex2jax: e.extensionSettings.mathJax ? e.extensionSettings.mathJax.tex2jax : void 0
|
||||||
|
}), document.body.appendChild(n);
|
||||||
|
}), define("libs/mathjax_init", function() {}), define("extensions/mathJax", [ "utils", "classes/Extension", "text!html/mathJaxSettingsBlock.html", "text!libs/mathjax_config.js", "mathjax" ], function(e, t, n) {
|
||||||
|
function i(e, t, n) {
|
||||||
|
var i = u.slice(e, t + 1).join("").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
||||||
|
for (w.Browser.isMSIE && (i = i.replace(/(%[^\n]*)\n/g, "$1<br/>\n")); t > e; ) u[t] = "",
|
||||||
t--;
|
t--;
|
||||||
k[e] = "@@" + m.length + "@@", n && (r = n(r)), m.push(r), i = o = l = null;
|
u[e] = "@@" + g.length + "@@", n && (i = n(i)), g.push(i), d = h = p = null;
|
||||||
}
|
}
|
||||||
function p(e) {
|
function o(e) {
|
||||||
i = o = l = null, m = [];
|
d = h = p = null, g = [];
|
||||||
var t;
|
var t;
|
||||||
/`/.test(e) ? (e = e.replace(/~/g, "~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm, function(e) {
|
/`/.test(e) ? (e = e.replace(/~/g, "~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm, function(e) {
|
||||||
return e.replace(/\$/g, "~D");
|
return e.replace(/\$/g, "~D");
|
||||||
@ -17838,80 +17846,47 @@ if (hljs.LANGUAGES.glsl = function(e) {
|
|||||||
});
|
});
|
||||||
}) : t = function(e) {
|
}) : t = function(e) {
|
||||||
return e;
|
return e;
|
||||||
}, k = r(e.replace(/\r\n?/g, "\n"), u);
|
}, u = C(e.replace(/\r\n?/g, "\n"), x);
|
||||||
for (var e = 1, a = k.length; a > e; e += 2) {
|
for (var e = 1, n = u.length; n > e; e += 2) {
|
||||||
var c = k[e];
|
var o = u[e];
|
||||||
"@" === c.charAt(0) ? (k[e] = "@@" + m.length + "@@", m.push(c)) : i ? c === o ? n ? l = e : b(i, e, t) : c.match(/\n.*\n/) ? (l && (e = l,
|
"@" === o.charAt(0) ? (u[e] = "@@" + g.length + "@@", g.push(o)) : d ? o === h ? f ? p = e : i(d, e, t) : o.match(/\n.*\n/) ? (p && (e = p,
|
||||||
b(i, e, t)), i = o = l = null, n = 0) : "{" === c ? n++ : "}" === c && n && n-- : c === s || "$$" === c ? (i = e,
|
i(d, e, t)), d = h = p = null, f = 0) : "{" === o ? f++ : "}" === o && f && f-- : o === y || "$$" === o ? (d = e,
|
||||||
o = c, n = 0) : "begin" === c.substr(1, 5) && (i = e, o = "\\end" + c.substr(6),
|
h = o, f = 0) : "begin" === o.substr(1, 5) && (d = e, h = "\\end" + o.substr(6),
|
||||||
n = 0);
|
f = 0);
|
||||||
}
|
}
|
||||||
return l && b(i, l, t), t(k.join(""));
|
return p && i(d, p, t), t(u.join(""));
|
||||||
}
|
}
|
||||||
function d(e) {
|
function r(e) {
|
||||||
return e = e.replace(/@@(\d+)@@/g, function(e, t) {
|
return e = e.replace(/@@(\d+)@@/g, function(e, t) {
|
||||||
return m[t];
|
return g[t];
|
||||||
}), m = null, e;
|
}), g = null, e;
|
||||||
}
|
}
|
||||||
function e() {
|
function s() {
|
||||||
q = !1, h.cancelTypeset = !1, h.Queue([ "Typeset", h, t ]), h.Queue(afterRefreshCallback);
|
v = !1, w.cancelTypeset = !1, w.Queue([ "Typeset", w, b ]), w.Queue(c);
|
||||||
}
|
}
|
||||||
function j() {
|
function a() {
|
||||||
!q && g && (q = !0, h.Cancel(), h.Queue(e));
|
!v && m && (v = !0, w.Cancel(), w.Queue(s));
|
||||||
}
|
}
|
||||||
var mathJax = new Extension("mathJax", "MathJax", !0);
|
var l = new t("mathJax", "MathJax", !0);
|
||||||
mathJax.settingsBlock = mathJaxSettingsBlockHTML, mathJax.defaultConfig = {
|
l.settingsBlock = n, l.defaultConfig = {
|
||||||
tex: "{}",
|
tex: "{}",
|
||||||
tex2jax: '{ inlineMath: [["$","$"],["\\\\\\\\(","\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true }'
|
tex2jax: '{ inlineMath: [["$","$"],["\\\\\\\\(","\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true }'
|
||||||
}, mathJax.onLoadSettings = function() {
|
}, l.onLoadSettings = function() {
|
||||||
utils.setInputValue("#input-mathjax-config-tex", mathJax.config.tex), utils.setInputValue("#input-mathjax-config-tex2jax", mathJax.config.tex2jax);
|
e.setInputValue("#input-mathjax-config-tex", l.config.tex), e.setInputValue("#input-mathjax-config-tex2jax", l.config.tex2jax);
|
||||||
}, mathJax.onSaveSettings = function(e, t) {
|
}, l.onSaveSettings = function(t, n) {
|
||||||
e.tex = utils.getInputJsValue("#input-mathjax-config-tex", t), e.tex2jax = utils.getInputJsValue("#input-mathjax-config-tex2jax", t);
|
t.tex = e.getInputJsValue("#input-mathjax-config-tex", n), t.tex2jax = e.getInputJsValue("#input-mathjax-config-tex2jax", n);
|
||||||
}, mathJax.onReady = function() {
|
}, l.onPagedownConfigure = function(e) {
|
||||||
eval("var tex = " + mathJax.config.tex), eval("var tex2jax = " + mathJax.config.tex2jax),
|
b = document.getElementById("preview-contents");
|
||||||
MathJax.Hub.Config({
|
var t = e.getConverter();
|
||||||
"HTML-CSS": {
|
t.hooks.chain("preConversion", o), t.hooks.chain("postConversion", r);
|
||||||
preferredFont: "TeX",
|
|
||||||
availableFonts: [ "STIX", "TeX" ],
|
|
||||||
linebreaks: {
|
|
||||||
automatic: !0
|
|
||||||
},
|
|
||||||
EqnChunk: 10,
|
|
||||||
imageFont: null
|
|
||||||
},
|
|
||||||
tex2jax: tex2jax,
|
|
||||||
TeX: $.extend({
|
|
||||||
noUndefined: {
|
|
||||||
attributes: {
|
|
||||||
mathcolor: "red",
|
|
||||||
mathbackground: "#FFEEEE",
|
|
||||||
mathsize: "90%"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Safe: {
|
|
||||||
allow: {
|
|
||||||
URLs: "safe",
|
|
||||||
classes: "safe",
|
|
||||||
cssIDs: "safe",
|
|
||||||
styles: "safe",
|
|
||||||
fontsize: "all"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, tex),
|
|
||||||
messageStyle: "none"
|
|
||||||
});
|
|
||||||
}, mathJax.onPagedownConfigure = function(e) {
|
|
||||||
t = document.getElementById("preview-contents");
|
|
||||||
var n = e.getConverter();
|
|
||||||
n.hooks.chain("preConversion", p), n.hooks.chain("postConversion", d);
|
|
||||||
};
|
};
|
||||||
var afterRefreshCallback = void 0;
|
var c = void 0;
|
||||||
mathJax.onAsyncPreview = function(e) {
|
l.onAsyncPreview = function(e) {
|
||||||
afterRefreshCallback = e, j();
|
c = e, a();
|
||||||
};
|
};
|
||||||
var g = !1, q = !1, t = null, s = "$", k, i, o, l, n, m, h = MathJax.Hub;
|
var u, d, h, p, f, g, m = !1, v = !1, b = null, y = "$", w = MathJax.Hub;
|
||||||
h.Queue(function() {
|
w.Queue(function() {
|
||||||
g = !0, h.processUpdateTime = 50, h.Config({
|
m = !0, w.processUpdateTime = 50, w.Config({
|
||||||
"HTML-CSS": {
|
"HTML-CSS": {
|
||||||
EqnChunk: 10,
|
EqnChunk: 10,
|
||||||
EqnChunkFactor: 1
|
EqnChunkFactor: 1
|
||||||
@ -17922,8 +17897,8 @@ if (hljs.LANGUAGES.glsl = function(e) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
var u = /(\$\$?|\\(?:begin|end)\{[a-z]*\*?\}|\\[\\{}$]|[{}]|(?:\n\s*)+|@@\d+@@)/i, r;
|
var C, x = /(\$\$?|\\(?:begin|end)\{[a-z]*\*?\}|\\[\\{}$]|[{}]|(?:\n\s*)+|@@\d+@@)/i;
|
||||||
return r = 3 === "aba".split(/(b)/).length ? function(e, t) {
|
return C = 3 === "aba".split(/(b)/).length ? function(e, t) {
|
||||||
return e.split(t);
|
return e.split(t);
|
||||||
} : function(e, t) {
|
} : function(e, t) {
|
||||||
var n, i = [];
|
var n, i = [];
|
||||||
@ -17973,7 +17948,7 @@ if (hljs.LANGUAGES.glsl = function(e) {
|
|||||||
this.cancelTypeset = !0;
|
this.cancelTypeset = !0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}(), mathJax;
|
}(), l;
|
||||||
}), define("extensions/emailConverter", [ "classes/Extension" ], function(e) {
|
}), define("extensions/emailConverter", [ "classes/Extension" ], function(e) {
|
||||||
var t = new e("emailConverter", "Markdown Email", !0);
|
var t = new e("emailConverter", "Markdown Email", !0);
|
||||||
return t.settingsBlock = "<p>Converts email adresses in the form <email@example.com> into clickable links.</p>",
|
return t.settingsBlock = "<p>Converts email adresses in the form <email@example.com> into clickable links.</p>",
|
||||||
@ -25445,6 +25420,7 @@ if (hljs.LANGUAGES.glsl = function(e) {
|
|||||||
underscore: {
|
underscore: {
|
||||||
exports: "_"
|
exports: "_"
|
||||||
},
|
},
|
||||||
|
mathjax: [ "libs/mathjax_init" ],
|
||||||
jgrowl: {
|
jgrowl: {
|
||||||
deps: [ "jquery" ],
|
deps: [ "jquery" ],
|
||||||
exports: "jQuery.jGrowl"
|
exports: "jQuery.jGrowl"
|
||||||
|
@ -2,8 +2,9 @@ define([
|
|||||||
"utils",
|
"utils",
|
||||||
"classes/Extension",
|
"classes/Extension",
|
||||||
"text!html/mathJaxSettingsBlock.html",
|
"text!html/mathJaxSettingsBlock.html",
|
||||||
|
"text!libs/mathjax_config.js",
|
||||||
"mathjax",
|
"mathjax",
|
||||||
], function(utils, Extension, mathJaxSettingsBlockHTML) {
|
], function(utils, Extension, mathJaxSettingsBlockHTML, mathjaxConfigJS) {
|
||||||
|
|
||||||
var mathJax = new Extension("mathJax", "MathJax", true);
|
var mathJax = new Extension("mathJax", "MathJax", true);
|
||||||
mathJax.settingsBlock = mathJaxSettingsBlockHTML;
|
mathJax.settingsBlock = mathJaxSettingsBlockHTML;
|
||||||
@ -21,46 +22,7 @@ define([
|
|||||||
newConfig.tex = utils.getInputJsValue("#input-mathjax-config-tex", event);
|
newConfig.tex = utils.getInputJsValue("#input-mathjax-config-tex", event);
|
||||||
newConfig.tex2jax = utils.getInputJsValue("#input-mathjax-config-tex2jax", event);
|
newConfig.tex2jax = utils.getInputJsValue("#input-mathjax-config-tex2jax", event);
|
||||||
};
|
};
|
||||||
|
|
||||||
mathJax.onReady = function() {
|
|
||||||
eval("var tex = " + mathJax.config.tex);
|
|
||||||
eval("var tex2jax = " + mathJax.config.tex2jax);
|
|
||||||
MathJax.Hub.Config({
|
|
||||||
"HTML-CSS": {
|
|
||||||
preferredFont: "TeX",
|
|
||||||
availableFonts: [
|
|
||||||
"STIX",
|
|
||||||
"TeX"
|
|
||||||
],
|
|
||||||
linebreaks: {
|
|
||||||
automatic: true
|
|
||||||
},
|
|
||||||
EqnChunk: 10,
|
|
||||||
imageFont: null
|
|
||||||
},
|
|
||||||
tex2jax: tex2jax,
|
|
||||||
TeX: $.extend({
|
|
||||||
noUndefined: {
|
|
||||||
attributes: {
|
|
||||||
mathcolor: "red",
|
|
||||||
mathbackground: "#FFEEEE",
|
|
||||||
mathsize: "90%"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Safe: {
|
|
||||||
allow: {
|
|
||||||
URLs: "safe",
|
|
||||||
classes: "safe",
|
|
||||||
cssIDs: "safe",
|
|
||||||
styles: "safe",
|
|
||||||
fontsize: "all"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, tex),
|
|
||||||
messageStyle: "none"
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
mathJax.onPagedownConfigure = function(editorObject) {
|
mathJax.onPagedownConfigure = function(editorObject) {
|
||||||
t = document.getElementById("preview-contents");
|
t = document.getElementById("preview-contents");
|
||||||
|
|
||||||
|
@ -55,6 +55,9 @@ requirejs.config({
|
|||||||
underscore: {
|
underscore: {
|
||||||
exports: '_'
|
exports: '_'
|
||||||
},
|
},
|
||||||
|
mathjax: [
|
||||||
|
'libs/mathjax_init'
|
||||||
|
],
|
||||||
jgrowl: {
|
jgrowl: {
|
||||||
deps: [
|
deps: [
|
||||||
'jquery'
|
'jquery'
|
||||||
|
@ -20,7 +20,7 @@ define([
|
|||||||
'<title><%= documentTitle %></title>\n',
|
'<title><%= documentTitle %></title>\n',
|
||||||
'<link rel="stylesheet" href="',
|
'<link rel="stylesheet" href="',
|
||||||
MAIN_URL,
|
MAIN_URL,
|
||||||
'css/main-min.css" />\n',
|
'res-min/themes/default.css" />\n',
|
||||||
'<script type="text/javascript" src="',
|
'<script type="text/javascript" src="',
|
||||||
MAIN_URL,
|
MAIN_URL,
|
||||||
'lib/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>\n',
|
'lib/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>\n',
|
||||||
|
Loading…
Reference in New Issue
Block a user