|
@@ -412,8 +412,11 @@ export class DocumentManager implements IDocumentManager {
|
|
|
path: string,
|
|
|
factoryName: string
|
|
|
): Private.IContext | undefined {
|
|
|
+ const normalizedPath = this.services.contents.normalize(path);
|
|
|
return find(this._contexts, context => {
|
|
|
- return context.path === path && context.factoryName === factoryName;
|
|
|
+ return (
|
|
|
+ context.path === normalizedPath && context.factoryName === factoryName
|
|
|
+ );
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -426,7 +429,8 @@ export class DocumentManager implements IDocumentManager {
|
|
|
* notebook model factory and a text model factory).
|
|
|
*/
|
|
|
private _contextsForPath(path: string): Private.IContext[] {
|
|
|
- return this._contexts.filter(context => context.path === path);
|
|
|
+ const normalizedPath = this.services.contents.normalize(path);
|
|
|
+ return this._contexts.filter(context => context.path === normalizedPath);
|
|
|
}
|
|
|
|
|
|
/**
|