@@ -19,15 +19,6 @@ const IPYTHON_CELL_START_REGEX = /^\s*In \[\d+\]:/gm;
19
19
*/
20
20
const LOG_INFO_MESSAGE_REGEX = / ^ \s * \[ .* \] I N F O / m;
21
21
22
- /**
23
- * Regular expression to match IPython multiline input "...:"
24
- * Sometimes IPython does not execute code when entering a newline, but enters a
25
- * multiline input mode, where it expects another line of code. We detect that
26
- * this happens and send an extra newline to run the code
27
- * See: https://github.com/Manim-Notebook/manim-notebook/issues/18
28
- */
29
- const IPYTHON_MULTILINE_START_REGEX = / ^ \s * \. { 3 } : \s + $ / m;
30
-
31
22
/**
32
23
* Regular expression to match a KeyboardInterrupt.
33
24
*/
@@ -577,9 +568,8 @@ export class ManimShell {
577
568
*
578
569
* @param shell The shell to execute the command in.
579
570
* @param command The command to execute in the shell.
580
- * @param useShellIntegration Whether to use shell integration if available
581
571
*/
582
- private exec ( shell : Terminal , command : string , useShellIntegration = true ) {
572
+ private exec ( shell : Terminal , command : string ) {
583
573
if ( ! shell ) {
584
574
Window . showErrorMessage ( "No shell to execute command in. Internal extension error." ) ;
585
575
return ;
@@ -588,7 +578,7 @@ export class ManimShell {
588
578
this . detectShellExecutionEnd = false ;
589
579
Logger . debug ( "🔒 Shell execution end detection disabled" ) ;
590
580
591
- if ( useShellIntegration && shell . shellIntegration ) {
581
+ if ( shell . shellIntegration ) {
592
582
Logger . debug ( `💨 Sending command to terminal (with shell integration): ${ command } ` ) ;
593
583
shell . shellIntegration . executeCommand ( command ) ;
594
584
} else {
@@ -775,14 +765,6 @@ export class ManimShell {
775
765
}
776
766
}
777
767
778
- if ( this . isExecutingCommand && data . match ( IPYTHON_MULTILINE_START_REGEX ) ) {
779
- Logger . debug ( "💨 IPython multiline detected, sending extra newline" ) ;
780
- // do not use shell integration here, as it might send a CTRL-C
781
- // while the prompt is not finished yet
782
- // \x7F deletes the extra line ("...:") from IPython
783
- this . exec ( this . activeShell , "\x7F" , false ) ;
784
- }
785
-
786
768
if ( data . match ( ERROR_REGEX ) ) {
787
769
Logger . debug ( "🚨 Error in IPython cell detected" ) ;
788
770
this . activeShell ?. show ( ) ;
0 commit comments