Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MJ 2.7.1 with new CM-MJ that supports MJ >2.4 #169

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CodeMirror-MathJax
2 changes: 1 addition & 1 deletion MathJax
Submodule MathJax updated 2632 files
6 changes: 6 additions & 0 deletions mathdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion test/browser-on-saucelabs.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down