vscode-json-languageservice 5.0.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -2
- package/lib/esm/jsonContributions.d.ts +17 -17
- package/lib/esm/jsonContributions.js +1 -1
- package/lib/esm/jsonLanguageService.d.ts +29 -29
- package/lib/esm/jsonLanguageService.js +66 -66
- package/lib/esm/jsonLanguageTypes.d.ts +292 -279
- package/lib/esm/jsonLanguageTypes.js +55 -46
- package/lib/esm/jsonSchema.d.ts +89 -89
- package/lib/esm/jsonSchema.js +1 -1
- package/lib/esm/parser/jsonParser.js +1236 -1214
- package/lib/esm/services/configuration.js +528 -528
- package/lib/esm/services/jsonCompletion.js +924 -918
- package/lib/esm/services/jsonDocumentSymbols.js +267 -267
- package/lib/esm/services/jsonFolding.js +120 -120
- package/lib/esm/services/jsonHover.js +109 -109
- package/lib/esm/services/jsonLinks.js +72 -72
- package/lib/esm/services/jsonSchemaService.js +593 -586
- package/lib/esm/services/jsonSelectionRanges.js +61 -61
- package/lib/esm/services/jsonValidation.js +151 -151
- package/lib/esm/utils/colors.js +68 -68
- package/lib/esm/utils/glob.js +124 -124
- package/lib/esm/utils/json.js +42 -42
- package/lib/esm/utils/objects.js +68 -68
- package/lib/esm/utils/strings.js +79 -64
- package/lib/umd/jsonContributions.d.ts +17 -17
- package/lib/umd/jsonContributions.js +12 -12
- package/lib/umd/jsonLanguageService.d.ts +29 -29
- package/lib/umd/jsonLanguageService.js +94 -90
- package/lib/umd/jsonLanguageTypes.d.ts +292 -279
- package/lib/umd/jsonLanguageTypes.js +103 -93
- package/lib/umd/jsonSchema.d.ts +89 -89
- package/lib/umd/jsonSchema.js +12 -12
- package/lib/umd/parser/jsonParser.js +1265 -1243
- package/lib/umd/services/configuration.js +541 -541
- package/lib/umd/services/jsonCompletion.js +938 -932
- package/lib/umd/services/jsonDocumentSymbols.js +281 -281
- package/lib/umd/services/jsonFolding.js +134 -134
- package/lib/umd/services/jsonHover.js +123 -123
- package/lib/umd/services/jsonLinks.js +86 -86
- package/lib/umd/services/jsonSchemaService.js +609 -602
- package/lib/umd/services/jsonSelectionRanges.js +75 -75
- package/lib/umd/services/jsonValidation.js +165 -165
- package/lib/umd/utils/colors.js +84 -84
- package/lib/umd/utils/glob.js +138 -138
- package/lib/umd/utils/json.js +56 -56
- package/lib/umd/utils/objects.js +87 -87
- package/lib/umd/utils/strings.js +98 -82
- package/package.json +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
5.2.0 / 2022-08/19
|
|
2
|
+
================
|
|
3
|
+
* new type `SchemaDraft`, representing the offical JSON schema draft versions
|
|
4
|
+
* new property `DocumentLanguageSettings.schemaDraft` to specify the schema version to use, if the schema does not contain a `$schema` property
|
|
5
|
+
|
|
6
|
+
5.1.0 / 2022-07-11
|
|
7
|
+
================
|
|
8
|
+
* new API option `FormattingOptions.keepLines` to indicate the formatter should keep the initial line positions
|
|
9
|
+
|
|
1
10
|
5.0.0 / 2022-05-17
|
|
2
11
|
================
|
|
3
|
-
* Update to `vscode-languageserver-types@3.
|
|
12
|
+
* Update to `vscode-languageserver-types@3.17`
|
|
4
13
|
* Add more schema support
|
|
5
14
|
* Schema 2019-09: unevaluatedProperties, unevaluatedItems, minContains, maxContains, deprecated, dependentRequired, dependentSchemas, $defs, $anchor
|
|
6
15
|
* Schema 2020-12: prefixItem
|
|
7
16
|
|
|
8
|
-
|
|
9
17
|
4.2.0 / 2022-01-25
|
|
10
18
|
================
|
|
11
19
|
* new API `LanguageService.getLanguageStatus`
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Thenable, MarkedString, CompletionItem } from './jsonLanguageService';
|
|
2
|
-
export interface JSONWorkerContribution {
|
|
3
|
-
getInfoContribution(uri: string, location: JSONPath): Thenable<MarkedString[]>;
|
|
4
|
-
collectPropertyCompletions(uri: string, location: JSONPath, currentWord: string, addValue: boolean, isLast: boolean, result: CompletionsCollector): Thenable<any>;
|
|
5
|
-
collectValueCompletions(uri: string, location: JSONPath, propertyKey: string, result: CompletionsCollector): Thenable<any>;
|
|
6
|
-
collectDefaultCompletions(uri: string, result: CompletionsCollector): Thenable<any>;
|
|
7
|
-
resolveCompletion?(item: CompletionItem): Thenable<CompletionItem>;
|
|
8
|
-
}
|
|
9
|
-
export declare type Segment = string | number;
|
|
10
|
-
export declare type JSONPath = Segment[];
|
|
11
|
-
export interface CompletionsCollector {
|
|
12
|
-
add(suggestion: CompletionItem): void;
|
|
13
|
-
error(message: string): void;
|
|
14
|
-
log(message: string): void;
|
|
15
|
-
setAsIncomplete(): void;
|
|
16
|
-
getNumberOfProposals(): number;
|
|
17
|
-
}
|
|
1
|
+
import { Thenable, MarkedString, CompletionItem } from './jsonLanguageService';
|
|
2
|
+
export interface JSONWorkerContribution {
|
|
3
|
+
getInfoContribution(uri: string, location: JSONPath): Thenable<MarkedString[]>;
|
|
4
|
+
collectPropertyCompletions(uri: string, location: JSONPath, currentWord: string, addValue: boolean, isLast: boolean, result: CompletionsCollector): Thenable<any>;
|
|
5
|
+
collectValueCompletions(uri: string, location: JSONPath, propertyKey: string, result: CompletionsCollector): Thenable<any>;
|
|
6
|
+
collectDefaultCompletions(uri: string, result: CompletionsCollector): Thenable<any>;
|
|
7
|
+
resolveCompletion?(item: CompletionItem): Thenable<CompletionItem>;
|
|
8
|
+
}
|
|
9
|
+
export declare type Segment = string | number;
|
|
10
|
+
export declare type JSONPath = Segment[];
|
|
11
|
+
export interface CompletionsCollector {
|
|
12
|
+
add(suggestion: CompletionItem): void;
|
|
13
|
+
error(message: string): void;
|
|
14
|
+
log(message: string): void;
|
|
15
|
+
setAsIncomplete(): void;
|
|
16
|
+
getNumberOfProposals(): number;
|
|
17
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { Thenable, ASTNode, Color, ColorInformation, ColorPresentation, LanguageServiceParams, LanguageSettings, DocumentLanguageSettings, FoldingRange, JSONSchema, SelectionRange, FoldingRangesContext, DocumentSymbolsContext, ColorInformationContext as DocumentColorsContext, TextDocument, Position, CompletionItem, CompletionList, Hover, Range, SymbolInformation, Diagnostic, TextEdit, FormattingOptions, DocumentSymbol, DefinitionLink, MatchingSchema, JSONLanguageStatus } from './jsonLanguageTypes';
|
|
2
|
-
import { DocumentLink } from 'vscode-languageserver-types';
|
|
3
|
-
export declare type JSONDocument = {
|
|
4
|
-
root: ASTNode | undefined;
|
|
5
|
-
getNodeFromOffset(offset: number, includeRightBound?: boolean): ASTNode | undefined;
|
|
6
|
-
};
|
|
7
|
-
export * from './jsonLanguageTypes';
|
|
8
|
-
export interface LanguageService {
|
|
9
|
-
configure(settings: LanguageSettings): void;
|
|
10
|
-
doValidation(document: TextDocument, jsonDocument: JSONDocument, documentSettings?: DocumentLanguageSettings, schema?: JSONSchema): Thenable<Diagnostic[]>;
|
|
11
|
-
parseJSONDocument(document: TextDocument): JSONDocument;
|
|
12
|
-
newJSONDocument(rootNode: ASTNode, syntaxDiagnostics?: Diagnostic[]): JSONDocument;
|
|
13
|
-
resetSchema(uri: string): boolean;
|
|
14
|
-
getMatchingSchemas(document: TextDocument, jsonDocument: JSONDocument, schema?: JSONSchema): Thenable<MatchingSchema[]>;
|
|
15
|
-
getLanguageStatus(document: TextDocument, jsonDocument: JSONDocument): JSONLanguageStatus;
|
|
16
|
-
doResolve(item: CompletionItem): Thenable<CompletionItem>;
|
|
17
|
-
doComplete(document: TextDocument, position: Position, doc: JSONDocument): Thenable<CompletionList | null>;
|
|
18
|
-
findDocumentSymbols(document: TextDocument, doc: JSONDocument, context?: DocumentSymbolsContext): SymbolInformation[];
|
|
19
|
-
findDocumentSymbols2(document: TextDocument, doc: JSONDocument, context?: DocumentSymbolsContext): DocumentSymbol[];
|
|
20
|
-
findDocumentColors(document: TextDocument, doc: JSONDocument, context?: DocumentColorsContext): Thenable<ColorInformation[]>;
|
|
21
|
-
getColorPresentations(document: TextDocument, doc: JSONDocument, color: Color, range: Range): ColorPresentation[];
|
|
22
|
-
doHover(document: TextDocument, position: Position, doc: JSONDocument): Thenable<Hover | null>;
|
|
23
|
-
format(document: TextDocument, range: Range, options: FormattingOptions): TextEdit[];
|
|
24
|
-
getFoldingRanges(document: TextDocument, context?: FoldingRangesContext): FoldingRange[];
|
|
25
|
-
getSelectionRanges(document: TextDocument, positions: Position[], doc: JSONDocument): SelectionRange[];
|
|
26
|
-
findDefinition(document: TextDocument, position: Position, doc: JSONDocument): Thenable<DefinitionLink[]>;
|
|
27
|
-
findLinks(document: TextDocument, doc: JSONDocument): Thenable<DocumentLink[]>;
|
|
28
|
-
}
|
|
29
|
-
export declare function getLanguageService(params: LanguageServiceParams): LanguageService;
|
|
1
|
+
import { Thenable, ASTNode, Color, ColorInformation, ColorPresentation, LanguageServiceParams, LanguageSettings, DocumentLanguageSettings, FoldingRange, JSONSchema, SelectionRange, FoldingRangesContext, DocumentSymbolsContext, ColorInformationContext as DocumentColorsContext, TextDocument, Position, CompletionItem, CompletionList, Hover, Range, SymbolInformation, Diagnostic, TextEdit, FormattingOptions, DocumentSymbol, DefinitionLink, MatchingSchema, JSONLanguageStatus } from './jsonLanguageTypes';
|
|
2
|
+
import { DocumentLink } from 'vscode-languageserver-types';
|
|
3
|
+
export declare type JSONDocument = {
|
|
4
|
+
root: ASTNode | undefined;
|
|
5
|
+
getNodeFromOffset(offset: number, includeRightBound?: boolean): ASTNode | undefined;
|
|
6
|
+
};
|
|
7
|
+
export * from './jsonLanguageTypes';
|
|
8
|
+
export interface LanguageService {
|
|
9
|
+
configure(settings: LanguageSettings): void;
|
|
10
|
+
doValidation(document: TextDocument, jsonDocument: JSONDocument, documentSettings?: DocumentLanguageSettings, schema?: JSONSchema): Thenable<Diagnostic[]>;
|
|
11
|
+
parseJSONDocument(document: TextDocument): JSONDocument;
|
|
12
|
+
newJSONDocument(rootNode: ASTNode, syntaxDiagnostics?: Diagnostic[]): JSONDocument;
|
|
13
|
+
resetSchema(uri: string): boolean;
|
|
14
|
+
getMatchingSchemas(document: TextDocument, jsonDocument: JSONDocument, schema?: JSONSchema): Thenable<MatchingSchema[]>;
|
|
15
|
+
getLanguageStatus(document: TextDocument, jsonDocument: JSONDocument): JSONLanguageStatus;
|
|
16
|
+
doResolve(item: CompletionItem): Thenable<CompletionItem>;
|
|
17
|
+
doComplete(document: TextDocument, position: Position, doc: JSONDocument): Thenable<CompletionList | null>;
|
|
18
|
+
findDocumentSymbols(document: TextDocument, doc: JSONDocument, context?: DocumentSymbolsContext): SymbolInformation[];
|
|
19
|
+
findDocumentSymbols2(document: TextDocument, doc: JSONDocument, context?: DocumentSymbolsContext): DocumentSymbol[];
|
|
20
|
+
findDocumentColors(document: TextDocument, doc: JSONDocument, context?: DocumentColorsContext): Thenable<ColorInformation[]>;
|
|
21
|
+
getColorPresentations(document: TextDocument, doc: JSONDocument, color: Color, range: Range): ColorPresentation[];
|
|
22
|
+
doHover(document: TextDocument, position: Position, doc: JSONDocument): Thenable<Hover | null>;
|
|
23
|
+
format(document: TextDocument, range: Range, options: FormattingOptions): TextEdit[];
|
|
24
|
+
getFoldingRanges(document: TextDocument, context?: FoldingRangesContext): FoldingRange[];
|
|
25
|
+
getSelectionRanges(document: TextDocument, positions: Position[], doc: JSONDocument): SelectionRange[];
|
|
26
|
+
findDefinition(document: TextDocument, position: Position, doc: JSONDocument): Thenable<DefinitionLink[]>;
|
|
27
|
+
findLinks(document: TextDocument, doc: JSONDocument): Thenable<DocumentLink[]>;
|
|
28
|
+
}
|
|
29
|
+
export declare function getLanguageService(params: LanguageServiceParams): LanguageService;
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { JSONCompletion } from './services/jsonCompletion';
|
|
6
|
-
import { JSONHover } from './services/jsonHover';
|
|
7
|
-
import { JSONValidation } from './services/jsonValidation';
|
|
8
|
-
import { JSONDocumentSymbols } from './services/jsonDocumentSymbols';
|
|
9
|
-
import { parse as parseJSON, newJSONDocument } from './parser/jsonParser';
|
|
10
|
-
import { schemaContributions } from './services/configuration';
|
|
11
|
-
import { JSONSchemaService } from './services/jsonSchemaService';
|
|
12
|
-
import { getFoldingRanges } from './services/jsonFolding';
|
|
13
|
-
import { getSelectionRanges } from './services/jsonSelectionRanges';
|
|
14
|
-
import { format as formatJSON } from 'jsonc-parser';
|
|
15
|
-
import { Range, TextEdit } from './jsonLanguageTypes';
|
|
16
|
-
import { findLinks } from './services/jsonLinks';
|
|
17
|
-
export * from './jsonLanguageTypes';
|
|
18
|
-
export function getLanguageService(params) {
|
|
19
|
-
const promise = params.promiseConstructor || Promise;
|
|
20
|
-
const jsonSchemaService = new JSONSchemaService(params.schemaRequestService, params.workspaceContext, promise);
|
|
21
|
-
jsonSchemaService.setSchemaContributions(schemaContributions);
|
|
22
|
-
const jsonCompletion = new JSONCompletion(jsonSchemaService, params.contributions, promise, params.clientCapabilities);
|
|
23
|
-
const jsonHover = new JSONHover(jsonSchemaService, params.contributions, promise);
|
|
24
|
-
const jsonDocumentSymbols = new JSONDocumentSymbols(jsonSchemaService);
|
|
25
|
-
const jsonValidation = new JSONValidation(jsonSchemaService, promise);
|
|
26
|
-
return {
|
|
27
|
-
configure: (settings) => {
|
|
28
|
-
jsonSchemaService.clearExternalSchemas();
|
|
29
|
-
if (settings.schemas) {
|
|
30
|
-
settings.schemas.forEach(settings => {
|
|
31
|
-
jsonSchemaService.registerExternalSchema(settings.uri, settings.fileMatch, settings.schema);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
jsonValidation.configure(settings);
|
|
35
|
-
},
|
|
36
|
-
resetSchema: (uri) => jsonSchemaService.onResourceChange(uri),
|
|
37
|
-
doValidation: jsonValidation.doValidation.bind(jsonValidation),
|
|
38
|
-
getLanguageStatus: jsonValidation.getLanguageStatus.bind(jsonValidation),
|
|
39
|
-
parseJSONDocument: (document) => parseJSON(document, { collectComments: true }),
|
|
40
|
-
newJSONDocument: (root, diagnostics) => newJSONDocument(root, diagnostics),
|
|
41
|
-
getMatchingSchemas: jsonSchemaService.getMatchingSchemas.bind(jsonSchemaService),
|
|
42
|
-
doResolve: jsonCompletion.doResolve.bind(jsonCompletion),
|
|
43
|
-
doComplete: jsonCompletion.doComplete.bind(jsonCompletion),
|
|
44
|
-
findDocumentSymbols: jsonDocumentSymbols.findDocumentSymbols.bind(jsonDocumentSymbols),
|
|
45
|
-
findDocumentSymbols2: jsonDocumentSymbols.findDocumentSymbols2.bind(jsonDocumentSymbols),
|
|
46
|
-
findDocumentColors: jsonDocumentSymbols.findDocumentColors.bind(jsonDocumentSymbols),
|
|
47
|
-
getColorPresentations: jsonDocumentSymbols.getColorPresentations.bind(jsonDocumentSymbols),
|
|
48
|
-
doHover: jsonHover.doHover.bind(jsonHover),
|
|
49
|
-
getFoldingRanges,
|
|
50
|
-
getSelectionRanges,
|
|
51
|
-
findDefinition: () => Promise.resolve([]),
|
|
52
|
-
findLinks,
|
|
53
|
-
format: (d, r, o) => {
|
|
54
|
-
let range = undefined;
|
|
55
|
-
if (r) {
|
|
56
|
-
const offset = d.offsetAt(r.start);
|
|
57
|
-
const length = d.offsetAt(r.end) - offset;
|
|
58
|
-
range = { offset, length };
|
|
59
|
-
}
|
|
60
|
-
const options = { tabSize: o ? o.tabSize : 4, insertSpaces: o?.insertSpaces === true, insertFinalNewline: o?.insertFinalNewline === true, eol: '\n' };
|
|
61
|
-
return formatJSON(d.getText(), range, options).map(e => {
|
|
62
|
-
return TextEdit.replace(Range.create(d.positionAt(e.offset), d.positionAt(e.offset + e.length)), e.content);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { JSONCompletion } from './services/jsonCompletion';
|
|
6
|
+
import { JSONHover } from './services/jsonHover';
|
|
7
|
+
import { JSONValidation } from './services/jsonValidation';
|
|
8
|
+
import { JSONDocumentSymbols } from './services/jsonDocumentSymbols';
|
|
9
|
+
import { parse as parseJSON, newJSONDocument } from './parser/jsonParser';
|
|
10
|
+
import { schemaContributions } from './services/configuration';
|
|
11
|
+
import { JSONSchemaService } from './services/jsonSchemaService';
|
|
12
|
+
import { getFoldingRanges } from './services/jsonFolding';
|
|
13
|
+
import { getSelectionRanges } from './services/jsonSelectionRanges';
|
|
14
|
+
import { format as formatJSON } from 'jsonc-parser';
|
|
15
|
+
import { Range, TextEdit } from './jsonLanguageTypes';
|
|
16
|
+
import { findLinks } from './services/jsonLinks';
|
|
17
|
+
export * from './jsonLanguageTypes';
|
|
18
|
+
export function getLanguageService(params) {
|
|
19
|
+
const promise = params.promiseConstructor || Promise;
|
|
20
|
+
const jsonSchemaService = new JSONSchemaService(params.schemaRequestService, params.workspaceContext, promise);
|
|
21
|
+
jsonSchemaService.setSchemaContributions(schemaContributions);
|
|
22
|
+
const jsonCompletion = new JSONCompletion(jsonSchemaService, params.contributions, promise, params.clientCapabilities);
|
|
23
|
+
const jsonHover = new JSONHover(jsonSchemaService, params.contributions, promise);
|
|
24
|
+
const jsonDocumentSymbols = new JSONDocumentSymbols(jsonSchemaService);
|
|
25
|
+
const jsonValidation = new JSONValidation(jsonSchemaService, promise);
|
|
26
|
+
return {
|
|
27
|
+
configure: (settings) => {
|
|
28
|
+
jsonSchemaService.clearExternalSchemas();
|
|
29
|
+
if (settings.schemas) {
|
|
30
|
+
settings.schemas.forEach(settings => {
|
|
31
|
+
jsonSchemaService.registerExternalSchema(settings.uri, settings.fileMatch, settings.schema);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
jsonValidation.configure(settings);
|
|
35
|
+
},
|
|
36
|
+
resetSchema: (uri) => jsonSchemaService.onResourceChange(uri),
|
|
37
|
+
doValidation: jsonValidation.doValidation.bind(jsonValidation),
|
|
38
|
+
getLanguageStatus: jsonValidation.getLanguageStatus.bind(jsonValidation),
|
|
39
|
+
parseJSONDocument: (document) => parseJSON(document, { collectComments: true }),
|
|
40
|
+
newJSONDocument: (root, diagnostics) => newJSONDocument(root, diagnostics),
|
|
41
|
+
getMatchingSchemas: jsonSchemaService.getMatchingSchemas.bind(jsonSchemaService),
|
|
42
|
+
doResolve: jsonCompletion.doResolve.bind(jsonCompletion),
|
|
43
|
+
doComplete: jsonCompletion.doComplete.bind(jsonCompletion),
|
|
44
|
+
findDocumentSymbols: jsonDocumentSymbols.findDocumentSymbols.bind(jsonDocumentSymbols),
|
|
45
|
+
findDocumentSymbols2: jsonDocumentSymbols.findDocumentSymbols2.bind(jsonDocumentSymbols),
|
|
46
|
+
findDocumentColors: jsonDocumentSymbols.findDocumentColors.bind(jsonDocumentSymbols),
|
|
47
|
+
getColorPresentations: jsonDocumentSymbols.getColorPresentations.bind(jsonDocumentSymbols),
|
|
48
|
+
doHover: jsonHover.doHover.bind(jsonHover),
|
|
49
|
+
getFoldingRanges,
|
|
50
|
+
getSelectionRanges,
|
|
51
|
+
findDefinition: () => Promise.resolve([]),
|
|
52
|
+
findLinks,
|
|
53
|
+
format: (d, r, o) => {
|
|
54
|
+
let range = undefined;
|
|
55
|
+
if (r) {
|
|
56
|
+
const offset = d.offsetAt(r.start);
|
|
57
|
+
const length = d.offsetAt(r.end) - offset;
|
|
58
|
+
range = { offset, length };
|
|
59
|
+
}
|
|
60
|
+
const options = { tabSize: o ? o.tabSize : 4, insertSpaces: o?.insertSpaces === true, insertFinalNewline: o?.insertFinalNewline === true, eol: '\n', keepLines: o?.keepLines === true };
|
|
61
|
+
return formatJSON(d.getText(), range, options).map(e => {
|
|
62
|
+
return TextEdit.replace(Range.create(d.positionAt(e.offset), d.positionAt(e.offset + e.length)), e.content);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|