extensions/markdown-language-features/src/tableOfContents.ts/TableOfContents/createForDocumentOrNotebook
class TableOfContents:	public static async createForDocumentOrNotebook(parser: IMdParser, document: ITextDocument): Promise<TableOfContents> {
		if (document.uri.scheme === Schemes.notebookCell) {
			const notebook = vscode.workspace.notebookDocuments
				.find(notebook => notebook.getCells().some(cell => cell.document === document));

			if (notebook) {
				return TableOfContents.createForNotebook(parser, notebook);
			}
		}

		return this.create(parser, document);
	}