Skip to content

Commit 8e1ee45

Browse files
ofriwclaude
andcommitted
Fix code block line wrapping in presentation slides
Changed white-space from 'pre' to 'pre-wrap' and added word-break properties to prevent code from overflowing horizontally in presentation mode. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6130928 commit 8e1ee45

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

website/src/components/PresentationMode/RevealSlideshow.module.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@
123123
overflow-y: auto;
124124
overflow-x: auto;
125125
height: 100%;
126-
white-space: pre;
126+
white-space: pre-wrap;
127127
}
128128

129-
.codeBlock code {
129+
:global(.reveal) .codeBlock code {
130130
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
131+
word-break: break-word;
132+
white-space: pre-wrap;
133+
overflow-wrap: break-word;
131134
}
132135

133136
.codeBlockSmall {
@@ -142,11 +145,14 @@
142145
overflow-y: auto;
143146
overflow-x: auto;
144147
max-height: 400px;
145-
white-space: pre;
148+
white-space: pre-wrap;
146149
}
147150

148-
.codeBlockSmall code {
151+
:global(.reveal) .codeBlockSmall code {
149152
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
153+
word-break: break-word;
154+
white-space: pre-wrap;
155+
overflow-wrap: break-word;
150156
}
151157

152158
.caption {

0 commit comments

Comments
 (0)