Skip to content

Commit e14e996

Browse files
committed
Per jsdom, move from Node.js to io.js
Also, upgrade jsdom to >=4.0.0, which includes fixes for self-closing tags. Bumps version to 0.1.0.
1 parent 302e025 commit e14e996

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ var rendered = notebook.render();
2222
document.body.appendChild(rendered);
2323
```
2424

25-
### Node.js Usage
25+
### IO.js Usage
26+
27+
*Note: To take advantage of `jsdom`'s latest features/bugfixes, `notebook.js` now runs on [io.js](https://iojs.org/) instead of Node.js.*
2628

2729
To install:
2830

2931
```sh
3032
npm install notebookjs
3133
```
3234

33-
Then parse, render, and (perhaps) print:
35+
Then parse, render, and write:
3436

3537
```js
3638
var fs = require ("fs");

bin/cli-render.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env node
1+
#!/usr/bin/env iojs
22
// Reads a notebook from stdin, prints the rendered HTML to stdout
33
var fs = require("fs");
44
var nb = require("../notebook.js");

notebook.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@
9898
};
9999
nb.display.svg = function (svg) {
100100
var el = makeElement("div", [ "svg-output" ]);
101-
var raw = svg.join("");
102-
// Fix for self-closing tags, which jsdom strips.
103-
var replaced = raw.replace(/<([^ ]+)([^<>]+)\/>/g, "<$1$2></$1>");
104-
el.innerHTML = replaced;
101+
el.innerHTML = svg.join("");
105102
return el;
106103
};
107104
nb.display.latex = function (latex) {

notebook.min.js

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
"name" : "notebookjs",
33
"description" : "Parse and render IPython/Jupyter notebooks.",
44
"homepage" : "https://github.com/jsvine/notebookjs",
5-
"keywords" : ["ipython", "jupyter" ],
5+
"keywords" : [ "ipython", "jupyter" ],
66
"author" : "Jeremy Singer-Vine <[email protected]>",
77
"contributors" : [],
88
"license": "MIT",
9-
"dependencies" : [ "jsdom", "marked", "ansi_up" ],
9+
"dependencies" : {
10+
"jsdom": ">=4.0.0",
11+
"marked": ">=0.3.3",
12+
"ansi_up": ">=1.1.3"
13+
},
1014
"repository" : {"type": "git", "url": "git://github.com/jsvine/notebookjs.git"},
1115
"main" : "notebook.js",
12-
"version" : "0.0.1"
16+
"version" : "0.1.0"
1317
}

0 commit comments

Comments
 (0)