Skip to content

Conversation

@pkra
Copy link
Contributor

@pkra pkra commented Aug 29, 2017

Fixes #355

lib/main.js Outdated

// fontURL to current MathJax version
if (!fontURL)
fontURL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/' + MathJax.version + '/fonts/HTML-CSS';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should be indented, if not braced (Volker would vote for braces).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that should have been on the same line (otherwise we overwrite a custom fontURL, no?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is still part of the if statement, even without braces. The newline doesn't change the meaning. Since it is a long expression, having it on a different line is fine. Using braces would not be a bad idea (and will make Volker happy).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will make @zorkow happy

Now how could I refuse that 😄

css: true
}, function (result, data) {
t.ok(result.css.indexOf('https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/fonts/HTML-CSS') > -1, 'Default fontURL');
t.ok(result.css.indexOf('https://cdnjs.cloudflare.com/ajax/libs/mathjax/' + mjVersion + '/fonts/HTML-CSS') > -1, 'Default fontURL');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other option, I suppose, is to do a regex search with mjVersion replaced by something like \d+\.\d+\.\d+. But I'm OK with the lookup as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nice idea. I somewhat favor this one but I'm ok either way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. Keep it as is, then.

addresses review of #356
@pkra
Copy link
Contributor Author

pkra commented Aug 30, 2017

@dvpc PTAL

@dpvc
Copy link
Member

dpvc commented Sep 5, 2017

LGTM

@pkra pkra added this to the 2.7.1 milestone Sep 5, 2017
@pkra pkra merged commit 2ce5fa9 into develop Sep 5, 2017
@pkra pkra deleted the 355 branch September 5, 2017 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants