Preserve previous code cell's language when creating a new code cell from an existing context. (#18646)

This commit is contained in:
Cory Rivera
2022-03-06 21:35:57 -08:00
committed by GitHub
parent 5d0f0afdc6
commit eccb77aca3
6 changed files with 41 additions and 11 deletions

View File

@@ -74,7 +74,7 @@ export class AddCellAction extends Action {
}
}
if (context?.model) {
context.model.addCell(this.cellType, index);
context.model.addCell(this.cellType, index, context.cell.metadata?.language);
context.model.sendNotebookTelemetryActionEvent(TelemetryKeys.NbTelemetryAction.AddCell, { cell_type: this.cellType });
}
} else {