Merge branch 'issue578' into develop. Issue #578.
This commit is contained in:
commit
5cb8bbb968
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
||||
var VERSION = "2.3";
|
||||
var VERSION = "2.3.1";
|
||||
var MML = MathJax.ElementJax.mml,
|
||||
HTMLCSS = MathJax.OutputJax["HTML-CSS"];
|
||||
|
||||
|
@ -34,18 +34,11 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
span = this.HTMLhandleSize(this.HTMLcreateSpan(span));
|
||||
var values = this.getValues("lquote","rquote");
|
||||
var text = this.data.join(""); // FIXME: handle mglyph?
|
||||
var pattern = [];
|
||||
if (values.lquote.length === 1) {pattern.push(this.HTMLquoteRegExp(values.lquote))}
|
||||
if (values.rquote.length === 1) {pattern.push(this.HTMLquoteRegExp(values.rquote))}
|
||||
if (pattern.length) {text = text.replace(RegExp("("+pattern.join("|")+")","g"),"\\$1")}
|
||||
this.HTMLhandleVariant(span,this.HTMLgetVariant(),values.lquote+text+values.rquote);
|
||||
this.HTMLhandleSpace(span);
|
||||
this.HTMLhandleColor(span);
|
||||
this.HTMLhandleDir(span);
|
||||
return span;
|
||||
},
|
||||
HTMLquoteRegExp: function (string) {
|
||||
return string.replace(/([.*+?|{}()\[\]\\])/g,"\\$1");
|
||||
}
|
||||
});
|
||||
MML.ms.prototype.defaults.mathvariant = 'monospace';
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
||||
var VERSION = "2.3";
|
||||
var VERSION = "2.3.1";
|
||||
var MML = MathJax.ElementJax.mml,
|
||||
SVG = MathJax.OutputJax.SVG;
|
||||
|
||||
|
@ -36,18 +36,11 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
|||
var values = this.getValues("lquote","rquote");
|
||||
var variant = this.SVGgetVariant(), scale = this.SVGgetScale();
|
||||
var text = this.data.join(""); // FIXME: handle mglyph?
|
||||
var pattern = [];
|
||||
if (values.lquote.length === 1) {pattern.push(this.SVGquoteRegExp(values.lquote))}
|
||||
if (values.rquote.length === 1) {pattern.push(this.SVGquoteRegExp(values.rquote))}
|
||||
if (pattern.length) {text = text.replace(RegExp("("+pattern.join("|")+")","g"),"\\$1")}
|
||||
svg.Add(this.SVGhandleVariant(variant,scale,values.lquote+text+values.rquote));
|
||||
svg.Clean();
|
||||
this.SVGhandleColor(svg);
|
||||
this.SVGsaveData(svg);
|
||||
return svg;
|
||||
},
|
||||
SVGquoteRegExp: function (string) {
|
||||
return string.replace(/([.*+?|{}()\[\]\\])/g,"\\$1");
|
||||
}
|
||||
});
|
||||
MML.ms.prototype.defaults.mathvariant = 'monospace';
|
||||
|
|
Loading…
Reference in New Issue
Block a user