diff --git a/CodeMirror-MathJax b/CodeMirror-MathJax index 2e5a9fa..16ee8d4 160000 --- a/CodeMirror-MathJax +++ b/CodeMirror-MathJax @@ -1 +1 @@ -Subproject commit 2e5a9fa5f77f800eb3cb9048167dee96a00ce39b +Subproject commit 16ee8d496625c11adee264d3136c55da061a15d7 diff --git a/MathJax b/MathJax index a4b82c5..d71cc40 160000 --- a/MathJax +++ b/MathJax @@ -1 +1 @@ -Subproject commit a4b82c521efc0f1845533bb85c7e41477fd67c42 +Subproject commit d71cc40666d213dceeb9353822a3b530656d9a4b diff --git a/mathdown.css b/mathdown.css index 7db24fd..661e49e 100644 --- a/mathdown.css +++ b/mathdown.css @@ -71,6 +71,12 @@ body { height: 80%; width: 95%; } .CodeMirror { font-family: "lining_numerals_charter", "Georgia", "Bitstream Charter", "David", "David CLM", "Times New Roman", "Times", serif; } +/* BUG: lining_numerals_charter somehow confuses MJ measurements when done in CM-MJ's typesetting div. + KLUDGE: I don't really care why, dropping this font from styles MJ uses for measurements works. + This is safe because these digits are about normal size anyway, and MJ uses its own fonts. */ +.CodeMirror .CodeMirror-MathJax-typesetting { + font-family: "Georgia", "Bitstream Charter", "David", "David CLM", "Times New Roman", "Times", serif; +} /* markdown mode styles `...` and indented code blocks as "comment". */ .cm-comment, .cm-leadingspace, .cm-formatting-list, .cm-formatting-quote, .cm-formatting-task { /* Prefer Courier and similar serif monospaced fonts. diff --git a/test/browser-on-saucelabs.spec.coffee b/test/browser-on-saucelabs.spec.coffee index caa10f3..0721d3a 100644 --- a/test/browser-on-saucelabs.spec.coffee +++ b/test/browser-on-saucelabs.spec.coffee @@ -144,9 +144,13 @@ describeBrowserTest = (browserName, getDesired, getSite) -> expect(err).to.be(null) browser.waitForElementByCss '.MathJax_Display', 15*sec, (err, el) -> expect(err).to.be(null) + # As of MathJax 2.7, there are 2 parts, one with aria-hidden="true" containing the visible rendering, + # and one with .MJX_Assistive_MathML class. + # `el.text` is supposed to return only visible text, but returns both as "α\nα". + # Never mind, (m)ultiline regexp flag makes $ match the newline. el.text (err, text) -> expect(err).to.be(null) - expect(text).to.match(/^\s*α\s*$/) + expect(text).to.match(/^\s*α\s*$/m) eachPassed = true done()