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
consistently use root/ prefix for note paths
azivner62de7f28eb12
diff --git a/package-lock.json b/package-lock.jsonindex 8ca0fe5a2e..4d90f18487 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,6 +1,6 @@{"name": "trilium",- "version": "0.22.0",+ "version": "0.22.1","lockfileVersion": 1,"requires": true,"dependencies": {diff --git a/src/public/javascripts/services/link.js b/src/public/javascripts/services/link.jsindex 8f6a15461a..e852f0f78c 100644--- a/src/public/javascripts/services/link.js+++ b/src/public/javascripts/services/link.js@@ -3,7 +3,7 @@ import noteDetailText from './note_detail_text.js';import treeUtils from './tree_utils.js';function getNotePathFromLink(url) {- const notePathMatch = /#root([A-Za-z0-9/]*)$/.exec(url);+ const notePathMatch = /#(root[A-Za-z0-9/]*)$/.exec(url);if (notePathMatch === null) {return null;@@ -14,7 +14,7 @@ function getNotePathFromLink(url) {}function getNotePathFromLabel(label) {- const notePathMatch = / \(([#A-Za-z0-9/]+)\)/.exec(label);+ const notePathMatch = / \(([A-Za-z0-9/]+)\)/.exec(label);if (notePathMatch !== null) {return notePathMatch[1];diff --git a/src/public/javascripts/services/tree.js b/src/public/javascripts/services/tree.jsindex 244d899e6d..58a4c859b6 100644--- a/src/public/javascripts/services/tree.js+++ b/src/public/javascripts/services/tree.js@@ -86,7 +86,7 @@ async function expandToNote(notePath, expandOpts) {const node = getNodesByNoteId(childNoteId).find(node => node.data.parentNoteId === parentNoteId);if (!node) {- console.log(`Can't find node for noteId=${childNoteId} with parentNoteId=${parentNoteId}`);+ console.error(`Can't find node for noteId=${childNoteId} with parentNoteId=${parentNoteId}`);}if (childNoteId === noteId) {diff --git a/src/services/note_cache.js b/src/services/note_cache.jsindex d7ecb194ea..c785ec1757 100644--- a/src/services/note_cache.js+++ b/src/services/note_cache.js@@ -192,6 +192,7 @@ function getNoteTitleForPath(path) {function getSomePath(noteId, path) {if (noteId === 'root') {+ path.push(noteId);path.reverse();return path;