diff --git a/index.html b/index.html index 376d7f1..2088278 100644 --- a/index.html +++ b/index.html @@ -613,6 +613,15 @@ const words = noteText.split(/\s+/).filter(w => w.length > 0); const firstFour = words.slice(0, 4).join(' '); noteTitle = 'Untitled: ' + (firstFour || 'note'); + // Add ellipsis if note has more than 4 words + if (words.length > 4) { + noteTitle += '...'; + } + } + + // Truncate title if it exceeds 120 characters + if (noteTitle.length > 120) { + noteTitle = noteTitle.substring(0, 120) + '...'; } try {