Skip to content

Commit 5fdad19

Browse files
authored
fix: Use 'json' as language name when parsing chart block from file (#173)
1 parent dab37cb commit 5fdad19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/notebooks/deepnote/converters/visualizationBlockConverter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class VisualizationBlockConverter implements BlockConverter {
8484
};
8585

8686
const jsonContent = JSON.stringify(config, null, 2);
87-
const cell = new NotebookCellData(NotebookCellKind.Code, jsonContent, 'JSON');
87+
const cell = new NotebookCellData(NotebookCellKind.Code, jsonContent, 'json');
8888

8989
return cell;
9090
}

src/notebooks/deepnote/converters/visualizationBlockConverter.unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ suite('VisualizationBlockConverter', () => {
5959
const cell = converter.convertToCell(block);
6060

6161
assert.strictEqual(cell.kind, NotebookCellKind.Code);
62-
assert.strictEqual(cell.languageId, 'JSON');
62+
assert.strictEqual(cell.languageId, 'json');
6363
assert.include(cell.value, '\n');
6464
assert.match(cell.value, /{\n "variable"/);
6565

0 commit comments

Comments
 (0)