|
|
|
@ -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(/^<ref:\d+>/, '') |
|
|
|
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) { |
|
|
|
|