浏览代码

[notebook] Avoid extra new lines on external notebooks import

Enrico Berti 10 年之前
父节点
当前提交
0e852367e2
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      desktop/libs/notebook/src/notebook/templates/editor_components.mako

+ 2 - 2
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -1609,10 +1609,10 @@ ${ require.config() }
                 window.setTimeout(function () {
                   if (cell.cell_type == "code") {
                     if (loaded.nbformat == 3) {
-                      addPySpark($.isArray(cell.input) ? cell.input.join("\n") : cell.input);
+                      addPySpark($.isArray(cell.input) ? cell.input.join("") : cell.input);
                     }
                     else {
-                      addPySpark($.isArray(cell.source) ? cell.source.join("\n") : cell.source);
+                      addPySpark($.isArray(cell.source) ? cell.source.join("") : cell.source);
                     }
                   }
                   if (cell.cell_type == "heading") {