Merge pull request #12 from pankajk07/master

Fixes microsoft/monaco-editor#2101
This commit is contained in:
Martin Aeschlimann 2020-09-21 07:15:52 -07:00 committed by GitHub
commit f379dfc153
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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