Improve find by tracking actual rendered text (#9419)

* Improve find by tracking actual rendered text

* Fix tests, add notebook md render
This commit is contained in:
Chris LaFreniere
2020-03-03 16:56:11 -08:00
committed by GitHub
parent ff0992510b
commit 0f9d98730e
5 changed files with 46 additions and 3 deletions

View File

@@ -37,6 +37,7 @@ export class CellModel implements ICellModel {
private _cellGuid: string;
private _future: FutureInternal;
private _outputs: nb.ICellOutput[] = [];
private _renderedOutputTextContent: string[] = [];
private _isEditMode: boolean;
private _onOutputsChanged = new Emitter<IOutputChangedEvent>();
private _onCellModeChanged = new Emitter<boolean>();
@@ -464,6 +465,14 @@ export class CellModel implements ICellModel {
return this._outputs;
}
public get renderedOutputTextContent(): string[] {
return this._renderedOutputTextContent;
}
public set renderedOutputTextContent(content: string[]) {
this._renderedOutputTextContent = content;
}
private handleReply(msg: nb.IShellMessage): void {
// TODO #931 we should process this. There can be a payload attached which should be added to outputs.
// In all other cases, it is a no-op

View File

@@ -468,6 +468,7 @@ export interface ICellModel {
executionCount: number | undefined;
readonly future: FutureInternal;
readonly outputs: ReadonlyArray<nb.ICellOutput>;
renderedOutputTextContent?: string[];
readonly onOutputsChanged: Event<IOutputChangedEvent>;
readonly onExecutionStateChange: Event<CellExecutionState>;
readonly executionState: CellExecutionState;