Set mime to markdown when changing to markdown language mode

Fixes #128873
This commit is contained in:
Matt Bierner
2021-07-30 13:11:20 -07:00
parent c47f9ad679
commit 446dfef287
@@ -1650,7 +1650,7 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction<ICellR
private async setLanguage(context: IChangeCellContext, languageId: string) {
if (languageId === 'markdown' && context.cell?.language !== 'markdown') {
const newCell = await changeCellToKind(CellKind.Markup, { cell: context.cell, notebookEditor: context.notebookEditor }, 'markdown');
const newCell = await changeCellToKind(CellKind.Markup, { cell: context.cell, notebookEditor: context.notebookEditor }, 'markdown', Mimes.markdown);
if (newCell) {
context.notebookEditor.focusNotebookCell(newCell, 'editor');
}