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
client: format note paths: each segment and delimiter as a separate span
Adorian Doran79b1d0126743
diff --git a/src/public/app/services/tree.js b/src/public/app/services/tree.jsindex 3a39075857..a721b76e7b 100644--- a/src/public/app/services/tree.js+++ b/src/public/app/services/tree.js@@ -273,10 +273,23 @@ async function getNoteTitleWithPathAsSuffix(notePath) {.append($('<span class="note-title">').text(title));if (path.length > 0) {- $titleWithPath- .append($('<span class="note-path">').text(` (${path.join(' / ')})`));- }+ const $notePath = $('<span class="note-path">');++ $notePath.append($(`<span class="path-bracket">(</span>)`));++ for (let segmentIndex = 0; segmentIndex < path.length; segmentIndex++) {+ $notePath.append($(`<span>`).text(path[segmentIndex]));++ if (segmentIndex < path.length - 1) {+ $notePath.append($(`<span class="path-bracket">`).text(" / "));+ }+ }+ $notePath.append($(`<span class="path-wrapper">)</span>)`));++ $titleWithPath.append($notePath);+ }+return $titleWithPath;}