A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
core: auto expand outline & callout in search result
Abdullah Atta65f3338df4cf
diff --git a/packages/core/src/api/lookup.ts b/packages/core/src/api/lookup.tsindex 7472b77f9..a32834560 100644--- a/packages/core/src/api/lookup.ts+++ b/packages/core/src/api/lookup.ts@@ -804,6 +804,14 @@ function highlightHtmlContent(html: string, queries: string[]): string {// Add the tag with its attributesresult += `<${name}`;for (const [key, value] of Object.entries(attributes)) {+ // auto expand outline lists+ if (name === "li" && key === "data-collapsed") continue;+ // auto expand callouts+ if (name === "div" && key === "class" && value?.includes("callout")) {+ result += ` ${key}="callout"`;+ continue;+ }+result += ` ${key}="${value}"`;}result += ">";