diff --git a/src/components/CommentSection.vue b/src/components/CommentSection.vue
index 82871c5..05aab52 100644
--- a/src/components/CommentSection.vue
+++ b/src/components/CommentSection.vue
@@ -75,8 +75,9 @@ function renderCommentContent(text: string): string {
if (refMatch) {
const id = Number(refMatch[1])
const quoted = comments.value.find((c) => c.id === id)
- const excerpt = quoted ? quoteExcerpt(quoted) : `评论 #${id}`
- html += ``
+ const missing = !quoted
+ const excerpt = quoted ? quoteExcerpt(quoted) : '找不到评论'
+ html += ``
rest = text.slice(refMatch[0].length)
}
const body = escapeHtml(rest.replace(/\\/g, '>'))
@@ -490,6 +491,12 @@ onMounted(() => {
flex-shrink: 0;
}
+:deep(.comment-ref-tag[data-missing]) {
+ border-color: var(--ac-border);
+ color: var(--ac-text-disabled);
+ background: var(--ac-bg-card);
+}
+
.quote-preview {
display: flex;
align-items: center;