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

显示 ChatGPT 输出的原文时保留空格和换行
This commit is contained in:
Yi 2023-03-22 19:42:01 +08:00 committed by GitHub
parent 9c6a3d6110
commit 92278932ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ defineExpose({ textRef })
<div ref="textRef" class="leading-relaxed break-words"> <div ref="textRef" class="leading-relaxed break-words">
<div v-if="!inversion"> <div v-if="!inversion">
<div v-if="!asRawText" class="markdown-body" v-html="text" /> <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>
<div v-else class="whitespace-pre-wrap" v-text="text" /> <div v-else class="whitespace-pre-wrap" v-text="text" />
</div> </div>

View File

@ -62,7 +62,7 @@
html.dark { html.dark {
.message-reply { .message-reply {
.raw-text { .whitespace-pre-wrap {
white-space: pre-wrap; white-space: pre-wrap;
color: var(--n-text-color); color: var(--n-text-color);
} }