mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Attempt to Colorize Code Cells from Notebook Contents (#13473)
* Attempt to colorize from saved language info * Simplify colorization change * Fixup
This commit is contained in:
@@ -336,6 +336,11 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
|||||||
this._cells = [];
|
this._cells = [];
|
||||||
if (contents) {
|
if (contents) {
|
||||||
this._defaultLanguageInfo = contents.metadata?.language_info;
|
this._defaultLanguageInfo = contents.metadata?.language_info;
|
||||||
|
// If language info was serialized in the notebook, attempt to use that to decrease time
|
||||||
|
// required until colorization occurs
|
||||||
|
if (this._defaultLanguageInfo) {
|
||||||
|
this.updateLanguageInfo(this._defaultLanguageInfo);
|
||||||
|
}
|
||||||
this._savedKernelInfo = this.getSavedKernelInfo(contents);
|
this._savedKernelInfo = this.getSavedKernelInfo(contents);
|
||||||
this._savedConnectionName = this.getSavedConnectionName(contents);
|
this._savedConnectionName = this.getSavedConnectionName(contents);
|
||||||
if (contents.metadata) {
|
if (contents.metadata) {
|
||||||
|
|||||||
Reference in New Issue
Block a user