@@ -370,7 +370,7 @@ def cell_output_to_nodes(outputs, data_priority, write_stderr, out_dir,
370370 return to_add
371371
372372
373- def attach_outputs (output_nodes , node , thebe_config , cm_language ):
373+ def attach_outputs (output_nodes , node , thebe_config ):
374374 if not node .attributes ["hide_code" ]: # only add css if code is displayed
375375 classes = node .attributes .get ("classes" , [])
376376 classes += ["jupyter_container" ]
@@ -384,7 +384,7 @@ def attach_outputs(output_nodes, node, thebe_config, cm_language):
384384 thebe_source = ThebeSourceNode (
385385 hide_code = node .attributes ["hide_code" ],
386386 code_below = node .attributes ["code_below" ],
387- language = cm_language ,
387+ language = node . attributes [ " cm_language" ] ,
388388 )
389389 thebe_source .children = [source ]
390390 input_node .children = [thebe_source ]
@@ -451,7 +451,7 @@ def apply(self):
451451 thebe_config ,
452452 )
453453 # Remove the outputbundlenode and we'll attach the outputs next
454- attach_outputs (output_nodes , cell_node , thebe_config , cell_node . cm_language )
454+ attach_outputs (output_nodes , cell_node , thebe_config )
455455
456456 # Image collect extra nodes from cell outputs that we need to process
457457 for node in self .document .traverse (image ):
0 commit comments