mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Merge pull request #3057 from bsorrentino/main
Fix issue #2295 - Models with "@" in their name do not resolve as dependencies
This commit is contained in:
commit
913ae66ad8
1 changed files with 3 additions and 2 deletions
|
|
@ -63,14 +63,15 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
|
|||
|
||||
getScriptFileNames(): string[] {
|
||||
const allModels = this._ctx.getMirrorModels().map((model) => model.uri);
|
||||
const models = allModels.filter((uri) => !fileNameIsLib(uri)).map((uri) => uri.toString());
|
||||
const models = allModels.filter((uri) => !fileNameIsLib(uri)).map((uri) => uri.toString(true));
|
||||
return models.concat(Object.keys(this._extraLibs));
|
||||
}
|
||||
|
||||
private _getModel(fileName: string): worker.IMirrorModel | null {
|
||||
let models = this._ctx.getMirrorModels();
|
||||
for (let i = 0; i < models.length; i++) {
|
||||
if (models[i].uri.toString() === fileName) {
|
||||
const uri = models[i].uri;
|
||||
if (uri.toString() === fileName || uri.toString(true) === fileName) {
|
||||
return models[i];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue