From bd3aa710cbef78a72d9af85d2a9908329e9381ab Mon Sep 17 00:00:00 2001 From: hddcc <531210118@qq.com> Date: Mon, 3 Aug 2026 22:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=AF=8F=E6=97=A5=E4=B8=80?= =?UTF-8?q?=E9=97=AE=E6=99=AE=E9=80=9A=E6=96=87=E6=9C=AC=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/_custom.scss | 6 ++++++ .../\346\257\217\346\227\245\344\270\200\351\227\256.md" | 1 + layouts/single.html | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/assets/_custom.scss b/assets/_custom.scss index 2cfcaea..34884aa 100644 --- a/assets/_custom.scss +++ b/assets/_custom.scss @@ -3716,6 +3716,12 @@ body { scrollbar-width: none; } +/* 每日一问兼容从普通文本粘贴的换行和连续空格。 */ +.markdown.preserve-whitespace p, +.markdown.preserve-whitespace li { + white-space: pre-wrap; +} + .book-menu .book-menu-content::-webkit-scrollbar, .book-menu nav::-webkit-scrollbar { width: 0; diff --git "a/content/docs/baguwen/\346\257\217\346\227\245\344\270\200\351\227\256.md" "b/content/docs/baguwen/\346\257\217\346\227\245\344\270\200\351\227\256.md" index 2b7e51a..4124a73 100644 --- "a/content/docs/baguwen/\346\257\217\346\227\245\344\270\200\351\227\256.md" +++ "b/content/docs/baguwen/\346\257\217\346\227\245\344\270\200\351\227\256.md" @@ -1,6 +1,7 @@ --- title: "每日一问" weight: 8 +preserveWhitespace: true --- # 每日一问 diff --git a/layouts/single.html b/layouts/single.html index 0d14199..5228e69 100644 --- a/layouts/single.html +++ b/layouts/single.html @@ -7,7 +7,7 @@ {{ $hasToc := partial "docs/toc-show" . }} {{ $content := partial "goclub/stripped-content.html" . }} -
+
{{ if $sectionTitle }}{{ $sectionTitle }}{{ else }}内容文档{{ end }}
{{ partial "docs/title" . }}