Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions assets/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions content/docs/baguwen/每日一问.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "每日一问"
weight: 8
preserveWhitespace: true
---

# 每日一问
Expand Down
2 changes: 1 addition & 1 deletion layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ $hasToc := partial "docs/toc-show" . }}
{{ $content := partial "goclub/stripped-content.html" . }}

<article class="markdown book-article">
<article class="markdown book-article{{ if .Params.preserveWhitespace }} preserve-whitespace{{ end }}">
<section class="page-lead">
<span class="page-lead-badge">{{ if $sectionTitle }}{{ $sectionTitle }}{{ else }}内容文档{{ end }}</span>
<div class="page-lead-title">{{ partial "docs/title" . }}</div>
Expand Down
Loading