Commit a5317aad authored by Boxiang Sun's avatar Boxiang Sun

Display the JS code reuslt if there have

parent 88f427e1
...@@ -255,10 +255,13 @@ ...@@ -255,10 +255,13 @@
var text = line_list.join('\n'), var text = line_list.join('\n'),
pre, pre,
br, br,
code; code,
result;
try { try {
return eval.call(window, text); result = eval.call(window, text);
renderCodeblock(result);
return result;
} catch (e) { } catch (e) {
console.error(e); console.error(e);
pre = document.createElement('pre'); pre = document.createElement('pre');
...@@ -487,7 +490,7 @@ ...@@ -487,7 +490,7 @@
// Do nothing... // Do nothing...
return; return;
} }
if (cell._type === 'js') { if (cell._type === 'js' || cell._type === 'code_js') {
return executeJSCell(cell._line_list); return executeJSCell(cell._line_list);
} }
if (cell._type === 'resource') { if (cell._type === 'resource') {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment