added more tests (#10161)

* added more tests

* typo fixes

* removed unused func

* added an extra assert

* fix typo
This commit is contained in:
Maddy
2020-04-26 23:34:53 -07:00
committed by GitHub
parent 586c28bf79
commit 4a87a12ac2
2 changed files with 63 additions and 13 deletions

View File

@@ -612,17 +612,6 @@ export class NotebookFindModel extends Disposable implements INotebookFindModel
return cellSrc.replace(/(?:__|[*#])|\[(.*?)\]\(.*?\)/gm, '$1');
}
// remove /n's to calculate the line number to locate the correct element
cleanUpCellSource(cellValue: string | string[]): string | string[] {
let trimmedCellSrc: string[] = [];
if (cellValue instanceof Array) {
trimmedCellSrc = cellValue.filter(c => c !== '\n' && c !== '\r\n' && c.indexOf('|-') === -1);
} else {
return cellValue;
}
return trimmedCellSrc;
}
clearFind(): void {
this._findArray = new Array<NotebookRange>();
this._findIndex = 0;