chore: 显示原文时使用 .whitespace-pre-wrap (#779)

显示 ChatGPT 输出的原文时保留空格和换行
This commit is contained in:
Yi authored and GitHub committed 2023-03-22 19:42:01 +08:00
1 parent 9c6a3d6110
commit 92278932ef
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -72,7 +72,7 @@ defineExpose({ textRef })
<div ref="textRef" class="leading-relaxed break-words">
<div v-if="!inversion">
<div v-if="!asRawText" class="markdown-body" v-html="text" />
<div v-else class="raw-text" v-text="text" />
<div v-else class="whitespace-pre-wrap" v-text="text" />
</div>
<div v-else class="whitespace-pre-wrap" v-text="text" />
</div>
+1 -1
View File
@@ -62,7 +62,7 @@
html.dark {
.message-reply {
.raw-text {
.whitespace-pre-wrap {
white-space: pre-wrap;
color: var(--n-text-color);
}