@ -516,11 +516,11 @@ var IPython = (function (IPython) {
source _cell instanceof IPython . MarkdownCell ) {
this . insert _code _cell _below ( i ) ;
var target _cell = this . cells ( ) [ i + 1 ] ;
var text = source _cell . get _ source ( ) ;
var text = source _cell . get _ text ( ) ;
if ( text === source _cell . placeholder ) {
text = '' ;
}
target _cell . set _ code ( text ) ;
target _cell . set _ text ( text ) ;
source _element . remove ( ) ;
target _cell . select ( ) ;
} ;
@ -537,20 +537,20 @@ var IPython = (function (IPython) {
if ( source _cell instanceof IPython . CodeCell ) {
this . insert _markdown _cell _below ( i ) ;
target _cell = this . cells ( ) [ i + 1 ] ;
var text = source _cell . get _ code ( ) ;
var text = source _cell . get _ text ( ) ;
} else if ( source _cell instanceof IPython . HTMLCell ) {
this . insert _markdown _cell _below ( i ) ;
target _cell = this . cells ( ) [ i + 1 ] ;
var text = source _cell . get _ source ( ) ;
var text = source _cell . get _ text ( ) ;
if ( text === source _cell . placeholder ) {
text = target _cell . placeholder ;
}
}
if ( target _cell !== null ) {
if ( text === "" ) { text = target _cell . placeholder ; } ;
// The edit must come before the set_ source .
// The edit must come before the set_ text .
target _cell . edit ( ) ;
target _cell . set _ source ( text ) ;
target _cell . set _ text ( text ) ;
source _element . remove ( ) ;
target _cell . select ( ) ;
}
@ -567,18 +567,18 @@ var IPython = (function (IPython) {
if ( source _cell instanceof IPython . CodeCell ) {
this . insert _html _cell _below ( i ) ;
target _cell = this . cells ( ) [ i + 1 ] ;
var text = source _cell . get _ code ( ) ;
var text = source _cell . get _ text ( ) ;
} else if ( source _cell instanceof IPython . MarkdownCell ) {
this . insert _html _cell _below ( i ) ;
target _cell = this . cells ( ) [ i + 1 ] ;
var text = source _cell . get _ source ( ) ;
var text = source _cell . get _ text ( ) ;
if ( text === source _cell . placeholder ) {
text = target _cell . placeholder ;
}
}
if ( target _cell !== null ) {
if ( text === "" ) { text = target _cell . placeholder ; } ;
target _cell . set _ source ( text ) ;
target _cell . set _ text ( text ) ;
source _element . remove ( ) ;
target _cell . edit ( ) ;
}
@ -689,9 +689,9 @@ var IPython = (function (IPython) {
var textb = cell . code _mirror . getRange ( cursor , end ) ;
texta = texta . replace ( /^\n+/ , '' ) . replace ( /\n+$/ , '' ) ;
textb = textb . replace ( /^\n+/ , '' ) . replace ( /\n+$/ , '' ) ;
cell . set _ code ( texta ) ;
cell . set _ text ( texta ) ;
var new _cell = this . insert _code _cell _below ( ) ;
new _cell . set _ code ( textb ) ;
new _cell . set _ text ( textb ) ;
} ;
} ;
@ -704,9 +704,9 @@ var IPython = (function (IPython) {
upper _cell = this . cells ( ) [ index - 1 ] ;
lower _cell = this . cells ( ) [ index ] ;
if ( upper _cell instanceof IPython . CodeCell && lower _cell instanceof IPython . CodeCell ) {
upper _text = upper _cell . get _ code ( ) ;
lower _text = lower _cell . get _ code ( ) ;
lower _cell . set _ code ( upper _text + '\n' + lower _text ) ;
upper _text = upper _cell . get _ text ( ) ;
lower _text = lower _cell . get _ text ( ) ;
lower _cell . set _ text ( upper _text + '\n' + lower _text ) ;
this . delete _cell ( index - 1 ) ;
} ;
} ;
@ -721,9 +721,9 @@ var IPython = (function (IPython) {
upper _cell = this . cells ( ) [ index ] ;
lower _cell = this . cells ( ) [ index + 1 ] ;
if ( upper _cell instanceof IPython . CodeCell && lower _cell instanceof IPython . CodeCell ) {
upper _text = upper _cell . get _ code ( ) ;
lower _text = lower _cell . get _ code ( ) ;
upper _cell . set _ code ( upper _text + '\n' + lower _text ) ;
upper _text = upper _cell . get _ text ( ) ;
lower _text = lower _cell . get _ text ( ) ;
upper _cell . set _ text ( upper _text + '\n' + lower _text ) ;
this . delete _cell ( index + 1 ) ;
} ;
} ;
@ -875,7 +875,7 @@ var IPython = (function (IPython) {
} else if ( payload [ i ] . source === 'IPython.zmq.zmqshell.ZMQInteractiveShell.set_next_input' ) {
var index = this . find _cell _index ( cell ) ;
var new _cell = this . insert _code _cell _below ( index ) ;
new _cell . set _ code ( payload [ i ] . text ) ;
new _cell . set _ text ( payload [ i ] . text ) ;
this . dirty = true ;
}
} ;
@ -1000,8 +1000,8 @@ var IPython = (function (IPython) {
cell . clear _output ( true , true , true ) ;
cell . set _input _prompt ( '*' ) ;
cell . element . addClass ( "running" ) ;
var code = cell . get _ code ( ) ;
var msg _id = that . kernel . execute ( cell . get _ code ( ) ) ;
var code = cell . get _ text ( ) ;
var msg _id = that . kernel . execute ( cell . get _ text ( ) ) ;
that . msg _cell _map [ msg _id ] = cell . cell _id ;
} else if ( cell instanceof IPython . HTMLCell ) {
cell . render ( ) ;