diff --git a/README.md b/README.md index 60211524..e4c042ac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # mathjax-node [![Build Status](https://travis-ci.org/mathjax/MathJax-node.svg?branch=develop)](https://travis-ci.org/mathjax/MathJax-node) -This repository contains files that provide APIs to call MathJax from +This repository contains files that provide APIs to call [MathJax](https://github.com/mathjax/mathjax) from node.js programs. There is an API for converting individual math expressions (in any of MathJax's input formats) into SVG images or MathML code, and there is an API for converting HTML snippets containing any of diff --git a/lib/patch/jsdom.js b/lib/patch/jsdom.js index 6d28d64b..0bb28a3d 100644 --- a/lib/patch/jsdom.js +++ b/lib/patch/jsdom.js @@ -3,12 +3,8 @@ // between node 4 and node 5, so check which one we have. // -var fs = require('fs'); - -var PARSERS = 'jsdom/node_modules/cssstyle/lib/parsers.js'; // node 4 hierarchy -try {fs.accessSync('node_modules/'+PARSERS, fs.F_OK)} catch (e) { - PARSERS = 'cssstyle/lib/parsers.js'; // node 5 heirarchy -} +var PARSERS = 'jsdom/node_modules/cssstyle/lib/parsers.js'; // node 4 hierarchy +try {require(PARSERS)} catch (e) {PARSERS = 'cssstyle/lib/parsers.js'} // node 5 heirarchy // // Companion to implicitSetter, but for the individual parts. diff --git a/package.json b/package.json index 2bf3c873..a58925e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mathjax-node", - "version": "0.5.0", + "version": "0.5.1", "description": "API's for calling MathJax from node.js", "keywords": [ "MathJax",