Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class NotebookComponent extends MessageListenersManager implements OnInit
}

onParagraphSearch(term: string) {
this.listOfNotebookParagraphComponent.forEach(comp => comp.highlightMatches(term || ''));
this.listOfNotebookParagraphComponent?.forEach(comp => comp.highlightMatches(term || ''));
}

saveParagraph(id: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export class NoteCreateComponent extends MessageListenersManager implements OnIn
const lastIndex = cloneNote.name.lastIndexOf(' ');
const endsWithNumber = !!cloneNote.name.match('^.+?\\s\\d$');
const noteNamePrefix = endsWithNumber ? cloneNote.name.slice(0, lastIndex) : cloneNote.name;
const regexp = new RegExp(`^${noteNamePrefix}.+`);
const escapedNoteNamePrefix = noteNamePrefix.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
const regexp = new RegExp(`^${escapedNoteNamePrefix}.+`);

this.noteListService.notes.flatList.forEach(note => {
const noteName = note.path;
Expand Down
Loading