Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e85869494 | ||
|
|
f8e9586be3 |
@@ -31,6 +31,7 @@ export class IdeComponent implements OnInit {
|
||||
|
||||
files: string[];
|
||||
filename = '';
|
||||
lastFilename = '';
|
||||
code = 'Loading your file...';
|
||||
|
||||
codeState = CodeState.SAVED;
|
||||
@@ -94,7 +95,10 @@ export class IdeComponent implements OnInit {
|
||||
}
|
||||
this.code = (message.content != null) ? message.content : this.code;
|
||||
this.files = message.files;
|
||||
this.autoDetectEditorLanguage(this.filename);
|
||||
if (this.lastFilename !== this.filename) {
|
||||
this.autoDetectEditorLanguage(this.filename);
|
||||
}
|
||||
this.lastFilename = this.filename;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,5 +29,6 @@ export const LanguageMap: { [extension: string]: string; } = {
|
||||
yml: 'yaml',
|
||||
css: 'css',
|
||||
less: 'less',
|
||||
scss: 'scss'
|
||||
scss: 'scss',
|
||||
sh: 'shell'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user