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" . }}