src/vs/workbench/api/common/extHostNotebookConcatDocument.ts/ExtHostNotebookConcatDocument/getText
class ExtHostNotebookConcatDocument:	getText(range?: vscode.Range): string {
		if (!range) {
			let result = '';
			for (const cell of this._cells) {
				result += cell.document.getText() + '\n';
			}
			// remove last newline again
			result = result.slice(0, -1);
			return result;
		}

		if (range.isEmpty) {
			return '';
		}

		// get start and end locations and create substrings
		const start = this.locationAt(range.start);
		const end = this.locationAt(range.end);
		const startCell = this._cells[this._cellUris.get(start.uri) ?? -1];
		const endCell = this._cells[this._cellUris.get(end.uri) ?? -1];

		if (!startCell || !endCell) {
			return '';
		} else if (startCell === endCell) {
			return startCell.document.getText(new types.Range(start.range.start, end.range.end));
		} else {
			const a = startCell.document.getText(new types.Range(start.range.start, new types.Position(startCell.document.lineCount, 0)));
			const b = endCell.document.getText(new types.Range(new types.Position(0, 0), end.range.end));
			return a + '\n' + b;
		}
	}