www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit aa8d543a4544a7aa43dd9da9dc304d21fea1d31f
parent 932b7e8f7c8511578c89229ba189584cc50834ec
Author: Frédéric Wang <fred.wang@free.fr>
Date:   Fri, 18 Oct 2013 10:40:38 +0200

follow-up: add directionality on remaining MathML error messages #627

Diffstat:
Munpacked/jax/input/MathML/jax.js | 4+++-
Munpacked/jax/output/HTML-CSS/autoload/mglyph.js | 2++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/unpacked/jax/input/MathML/jax.js b/unpacked/jax/input/MathML/jax.js @@ -77,7 +77,9 @@ mml = this.TeXAtom(match[2]); } else if (!(MML[type] && MML[type].isa && MML[type].isa(MML.mbase))) { MathJax.Hub.signal.Post(["MathML Jax - unknown node type",type]); - return MML.merror(_("UnknownNodeType","Unknown node type: %1",type)); + var err = MML.merror(_("UnknownNodeType","Unknown node type: %1",type)); + if (MathJax.Localization.fontDirection()) {err = MML.mstyle(err).With({dir: "rtl"})}; + return err; } else { mml = MML[type](); } diff --git a/unpacked/jax/output/HTML-CSS/autoload/mglyph.js b/unpacked/jax/output/HTML-CSS/autoload/mglyph.js @@ -46,6 +46,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { if (values.alt === "") {values.alt = LOCALE._(["MathML","BadMglyphFont"],"Bad font: %1",font.family)} err = MML.merror(values.alt).With({mathsize:"75%"}); + if (LOCALE.fontDirection()) {err = MML.mstyle(err).With({dir: "rtl"})}; this.Append(err); err.toHTML(span); this.data.pop(); span.bbox = err.HTMLspanElement().bbox; } @@ -65,6 +66,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { err = MML.merror( LOCALE._(["MathML","BadMglyph"],"Bad mglyph: %1",values.src) ).With({mathsize:"75%"}); + if (LOCALE.fontDirection()) {err = MML.mstyle(err).With({dir: "rtl"})}; this.Append(err); err.toHTML(span); this.data.pop(); span.bbox = err.HTMLspanElement().bbox; } else {