diff --git a/public/s/js/comments.js b/public/s/js/comments.js index d25eae4..7bcec59 100644 --- a/public/s/js/comments.js +++ b/public/s/js/comments.js @@ -1160,17 +1160,13 @@ class CommentSystem { const author = openerEl.dataset.display || openerEl.dataset.username || 'System'; const contentEl = body.querySelector('.comment-content'); if (contentEl) { - const LINE_MAX = 200; let rawText = (contentEl.dataset.raw || '').trim(); if (rawText.includes('>') || rawText.includes('<') || rawText.includes('&')) { const txt = document.createElement('textarea'); txt.innerHTML = rawText; rawText = txt.value; } - // Preserve all lines but cap any single line exceeding LINE_MAX chars - const lines = rawText.split('\n').map(line => - line.length > LINE_MAX ? line.substring(0, LINE_MAX) + '\u2026' : line - ); + const lines = rawText.split('\n'); const quote = `>>${id} \n>${author}\n${lines.map(line => `>${line}`).join('\n')}\n`; if (isNew) { @@ -1634,7 +1630,7 @@ class CommentSystem { // Truncate extremely long comments before any processing let truncated = false; if (!bypassTruncation && content.length > CommentSystem.ITEM_VIEW_MAX_CHARS) { - content = content.substring(0, CommentSystem.ITEM_VIEW_MAX_CHARS) + '\u2026'; + content = content.substring(0, CommentSystem.ITEM_VIEW_MAX_CHARS); truncated = true; } diff --git a/public/s/js/sidebar-activity.js b/public/s/js/sidebar-activity.js index cab51fa..964ebf6 100644 --- a/public/s/js/sidebar-activity.js +++ b/public/s/js/sidebar-activity.js @@ -153,12 +153,6 @@ const renderCommentContent = (content, commentId = null, itemId = null) => { if (!content) return ''; - // Truncate extremely long comments before any processing to keep the sidebar - // fast and the DOM lean, regardless of markdown / regex complexity. - if (content.length > SIDEBAR_CONTENT_TRUNCATE) { - content = content.substring(0, SIDEBAR_CONTENT_TRUNCATE) + '\u2026'; - } - if (typeof marked === 'undefined') { return escapeHtml(content) .replace(/:([a-z0-9_]+):/g, (m, n) => renderEmoji(m, n));