Skip to content

Commit 4f82bfe

Browse files
committed
Restore typical line break behavior in code output
1 parent a406a63 commit 4f82bfe

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docs/styles/custom.css

+9
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ Out[ ] blocks are not displayed.
55
.jp-InputPrompt, .jp-OutputPrompt {
66
display: none !important;
77
}
8+
9+
/*
10+
Note: For some reason, ".jp-OutputArea-area pre" didn't work as selector.
11+
But by introducing the custom class that is added through the plugin to jupyter
12+
input or output cells, we can target the pre tags inside the cells.
13+
*/
14+
.jupyter-custom-highlight .jp-OutputArea-area > pre {
15+
white-space: pre;
16+
}

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ plugins:
4343
show_input: true
4444
include_source: true
4545
no_input: false
46+
highlight_extra_classes: jupyter-custom-highlight
4647

4748
- mkdocstrings:
4849
handlers:

0 commit comments

Comments
 (0)