mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
get rid of namespace dependency in Cell
This commit is contained in:
parent
24bd52c572
commit
561c0de118
@ -54,6 +54,7 @@ define(function(){
|
|||||||
jglobal('TextCell','base/js/textcell');
|
jglobal('TextCell','base/js/textcell');
|
||||||
jglobal('MarkdownCell','base/js/textcell');
|
jglobal('MarkdownCell','base/js/textcell');
|
||||||
jglobal('RawCell','base/js/textcell');
|
jglobal('RawCell','base/js/textcell');
|
||||||
|
jglobal('Cell','base/js/cell');
|
||||||
|
|
||||||
Jupyter.version = "4.0.0.dev";
|
Jupyter.version = "4.0.0.dev";
|
||||||
Jupyter._target = '_blank';
|
Jupyter._target = '_blank';
|
||||||
|
@ -11,15 +11,13 @@
|
|||||||
|
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'base/js/namespace',
|
|
||||||
'jquery',
|
'jquery',
|
||||||
'base/js/utils',
|
'base/js/utils',
|
||||||
'codemirror/lib/codemirror',
|
'codemirror/lib/codemirror',
|
||||||
'codemirror/addon/edit/matchbrackets',
|
'codemirror/addon/edit/matchbrackets',
|
||||||
'codemirror/addon/edit/closebrackets',
|
'codemirror/addon/edit/closebrackets',
|
||||||
'codemirror/addon/comment/comment'
|
'codemirror/addon/comment/comment'
|
||||||
], function(IPython, $, utils, CodeMirror, cm_match, cm_closeb, cm_comment) {
|
], function($, utils, CodeMirror, cm_match, cm_closeb, cm_comment) {
|
||||||
// TODO: remove IPython dependency here
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var overlayHack = CodeMirror.scrollbarModel.native.prototype.overlayHack;
|
var overlayHack = CodeMirror.scrollbarModel.native.prototype.overlayHack;
|
||||||
@ -319,7 +317,7 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delegates keyboard shortcut handling to either IPython keyboard
|
* Delegates keyboard shortcut handling to either Jupyter keyboard
|
||||||
* manager when in command mode, or CodeMirror when in edit mode
|
* manager when in command mode, or CodeMirror when in edit mode
|
||||||
*
|
*
|
||||||
* @method handle_keyevent
|
* @method handle_keyevent
|
||||||
@ -590,7 +588,7 @@ define([
|
|||||||
// On 3.0 and below, these things were regex.
|
// On 3.0 and below, these things were regex.
|
||||||
// But now should be string for json-able config.
|
// But now should be string for json-able config.
|
||||||
// We should get rid of assuming they might be already
|
// We should get rid of assuming they might be already
|
||||||
// in a later version of IPython.
|
// in a later version of Jupyter.
|
||||||
var re = regs[i];
|
var re = regs[i];
|
||||||
if(typeof(re) === 'string'){
|
if(typeof(re) === 'string'){
|
||||||
re = new RegExp(re)
|
re = new RegExp(re)
|
||||||
@ -710,9 +708,6 @@ define([
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Backwards compatibility.
|
|
||||||
IPython.Cell = Cell;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
Cell: Cell,
|
Cell: Cell,
|
||||||
UnrecognizedCell: UnrecognizedCell
|
UnrecognizedCell: UnrecognizedCell
|
||||||
|
Loading…
Reference in New Issue
Block a user