Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
allow searching within mermaid diagrams, closes #2821
zadam70edd9a21009
diff --git a/src/services/search/expressions/note_content_protected_fulltext.js b/src/services/search/expressions/note_content_protected_fulltext.jsindex b24d3801a4..c93017a9a5 100644--- a/src/services/search/expressions/note_content_protected_fulltext.js+++ b/src/services/search/expressions/note_content_protected_fulltext.js@@ -33,7 +33,7 @@ class NoteContentProtectedFulltextExp extends Expression {for (let {noteId, type, mime, content} of sql.iterateRows(`SELECT noteId, type, mime, contentFROM notes JOIN note_contents USING (noteId)- WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 1`)) {+ WHERE type IN ('text', 'code', 'mermaid') AND isDeleted = 0 AND isProtected = 1`)) {if (!inputNoteSet.hasNoteId(noteId) || !(noteId in becca.notes)) {continue;diff --git a/src/services/search/expressions/note_content_unprotected_fulltext.js b/src/services/search/expressions/note_content_unprotected_fulltext.jsindex 60df925702..7b97722b8c 100644--- a/src/services/search/expressions/note_content_unprotected_fulltext.js+++ b/src/services/search/expressions/note_content_unprotected_fulltext.js@@ -27,7 +27,7 @@ class NoteContentUnprotectedFulltextExp extends Expression {for (let {noteId, type, mime, content} of sql.iterateRows(`SELECT noteId, type, mime, contentFROM notes JOIN note_contents USING (noteId)- WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 0`)) {+ WHERE type IN ('text', 'code', 'mermaid') AND isDeleted = 0 AND isProtected = 0`)) {if (!inputNoteSet.hasNoteId(noteId) || !(noteId in becca.notes)) {continue;