diff --git a/src/components/CommentSection.vue b/src/components/CommentSection.vue index 677c387..846bd54 100644 --- a/src/components/CommentSection.vue +++ b/src/components/CommentSection.vue @@ -57,8 +57,11 @@ function renderCommentContent(text: string): string { } function quoteExcerpt(comment: CommentResponse): string { - const s = (comment.content ?? '').replace(/\s+/g, ' ').trim() - return s.length > 40 ? s.slice(0, 40) + '…' : s + const raw = comment.content ?? '' + const stripped = raw.replace(/^/, '') + const s = stripped.replace(/\s+/g, ' ').trim() + const content = s.length > 30 ? s.slice(0, 30) + '…' : s + return `${comment.authorName ?? ''}:${content}` } function quoteComment(comment: CommentResponse) {