mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Fix indentation
This commit is contained in:
parent
8e01f87054
commit
7e5cb3e7ac
3 changed files with 41 additions and 42 deletions
|
|
@ -25,25 +25,25 @@ enum IndentStyle {
|
|||
|
||||
export function flattenDiagnosticMessageText(diag: string | ts.DiagnosticMessageChain | undefined, newLine: string, indent = 0): string {
|
||||
if (typeof diag === "string") {
|
||||
return diag;
|
||||
return diag;
|
||||
}
|
||||
else if (diag === undefined) {
|
||||
return "";
|
||||
return "";
|
||||
}
|
||||
let result = "";
|
||||
if (indent) {
|
||||
result += newLine;
|
||||
result += newLine;
|
||||
|
||||
for (let i = 0; i < indent; i++) {
|
||||
result += " ";
|
||||
}
|
||||
for (let i = 0; i < indent; i++) {
|
||||
result += " ";
|
||||
}
|
||||
}
|
||||
result += diag.messageText;
|
||||
indent++;
|
||||
if (diag.next) {
|
||||
for (const kid of diag.next) {
|
||||
result += flattenDiagnosticMessageText(kid, newLine, indent);
|
||||
}
|
||||
for (const kid of diag.next) {
|
||||
result += flattenDiagnosticMessageText(kid, newLine, indent);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,15 +144,14 @@ export class LanguageServiceDefaultsImpl implements monaco.languages.typescript.
|
|||
|
||||
//#region enums copied from typescript to prevent loading the entire typescriptServices ---
|
||||
|
||||
|
||||
enum ModuleKind {
|
||||
None = 0,
|
||||
CommonJS = 1,
|
||||
AMD = 2,
|
||||
UMD = 3,
|
||||
System = 4,
|
||||
ES2015 = 5,
|
||||
ESNext = 99
|
||||
None = 0,
|
||||
CommonJS = 1,
|
||||
AMD = 2,
|
||||
UMD = 3,
|
||||
System = 4,
|
||||
ES2015 = 5,
|
||||
ESNext = 99
|
||||
}
|
||||
|
||||
enum JsxEmit {
|
||||
|
|
@ -168,17 +167,17 @@ enum NewLineKind {
|
|||
}
|
||||
|
||||
enum ScriptTarget {
|
||||
ES3 = 0,
|
||||
ES5 = 1,
|
||||
ES2015 = 2,
|
||||
ES2016 = 3,
|
||||
ES2017 = 4,
|
||||
ES2018 = 5,
|
||||
ES2019 = 6,
|
||||
ES2020 = 7,
|
||||
ESNext = 99,
|
||||
JSON = 100,
|
||||
Latest = ESNext,
|
||||
ES3 = 0,
|
||||
ES5 = 1,
|
||||
ES2015 = 2,
|
||||
ES2016 = 3,
|
||||
ES2017 = 4,
|
||||
ES2018 = 5,
|
||||
ES2019 = 6,
|
||||
ES2020 = 7,
|
||||
ESNext = 99,
|
||||
JSON = 100,
|
||||
Latest = ESNext,
|
||||
}
|
||||
|
||||
enum ModuleResolutionKind {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue