@@ -27,6 +27,10 @@ import roll from "./static/rolling.svg";
2727require ( "codemirror/lib/codemirror.css" ) ;
2828require ( "codemirror/mode/javascript/javascript" ) ;
2929require ( "codemirror/theme/yeti.css" ) ;
30+ require ( "codemirror/addon/edit/closebrackets" ) ;
31+ require ( "codemirror/addon/edit/matchbrackets" ) ;
32+ require ( "codemirror/addon/hint/javascript-hint" ) ;
33+ require ( "codemirror/addon/hint/show-hint" ) ;
3034
3135export default function Cell ( {
3236 cell,
@@ -40,7 +44,6 @@ export default function Cell({
4044 const refOutput = useRef ( "" ) ;
4145 const [ showMoreCellButton , setShowMoreCellButton ] = useState ( "none" ) ;
4246 useEffect ( ( ) => {
43- console . log ( "hello" ) ;
4447 if ( currentCell === cellId ) {
4548 setShowMoreCellButton ( "flex" ) ;
4649 } else {
@@ -49,7 +52,6 @@ export default function Cell({
4952 } , [ cellId , currentCell ] ) ;
5053 // eslint-disable-next-line consistent-return
5154 const getCode = async ( ) => {
52- console . log ( "oops" ) ;
5355 window . current_cell = cellId ;
5456 if ( cell . type === "code" ) {
5557 const input = refCode . current . getCodeMirror ( ) . getValue ( ) ;
@@ -80,11 +82,7 @@ export default function Cell({
8082 }
8183 }
8284 }
83- if (
84- input . includes ( "table" ) ||
85- input . includes ( "plot" ) ||
86- input . includes ( "console.log(" )
87- ) {
85+ if ( input . includes ( "table" ) || input . includes ( "plot" ) ) {
8886 // eslint-disable-next-line no-eval
8987 const id = `out_${ window . current_cell } ` ;
9088 return false ;
0 commit comments