Skip to content

Commit 1176886

Browse files
committed
[main] pass input data to result object
Resolves #239
1 parent fe6cb7b commit 1176886

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ function ReturnResult(result) {
768768
if (!data.mml) {
769769
delete result.mml;
770770
}
771-
callback(result);
771+
callback(result, data);
772772
serverState = STATE.READY;
773773
StartQueue();
774774
}

test/base-mathjax.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var tape = require('tape');
22
var mjAPI = require("../lib/main.js");
33

44
tape('basic test: check MathJax core', function(t) {
5-
t.plan(1);
5+
t.plan(2);
66

77
var tex = '';
88
mjAPI.start();
@@ -11,7 +11,8 @@ tape('basic test: check MathJax core', function(t) {
1111
math: tex,
1212
format: "TeX",
1313
mml: true
14-
}, function(data) {
15-
t.ok(data.mml, 'MathJax core seems ok');
14+
}, function(result,data) {
15+
t.ok(result.mml, 'MathJax core seems ok');
16+
t.ok(data.math, 'MathJax input preserved');
1617
});
1718
});

0 commit comments

Comments
 (0)