Browse Source

Fixes microsoft/monaco-editor#2101

Pankaj Khandelwal 4 năm trước cách đây
mục cha
commit
0b66311655
1 tập tin đã thay đổi với 2 bổ sung5 xóa
  1. 2 5
      src/htmlWorker.ts

+ 2 - 5
src/htmlWorker.ts

@@ -45,11 +45,8 @@ export class HTMLWorker {
 		options: htmlService.FormattingOptions
 	): Promise<htmlService.TextEdit[]> {
 		let document = this._getTextDocument(uri);
-		let textEdits = this._languageService.format(
-			document,
-			range,
-			this._languageSettings && this._languageSettings.format
-		);
+		let formattingOptions = { ...this._languageSettings.format, ...options };
+		let textEdits = this._languageService.format(document, range, formattingOptions);
 		return Promise.resolve(textEdits);
 	}
 	async doHover(uri: string, position: htmlService.Position): Promise<htmlService.Hover> {