Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ export class EditorComponent extends React.Component<IProps> {

private async loadText(text: string, repo: string, file: string, lang: string, revision: string) {
if (this.monaco) {
try {
await monaco.editor.colorize(text, lang, {});
} catch (e) {
// workaround a upstream issue: https://github.com/microsoft/monaco-editor/issues/134
lang = 'text';
}
this.editor = await this.monaco.loadFile(repo, file, text, lang, revision);
this.registerGutterClickHandler();
}
Expand Down