Skip to content

Commit 3599f01

Browse files
authored
Fix formatting of Markdown code blocks (#2750)
* Fix formatting of Markdown code blocks * Fix lint
1 parent b3e2f75 commit 3599f01

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/sphinx/_static/css/custom.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* Display GitHub Flavored Markdown code blocks correctly */
2+
3+
.rst-content pre {
4+
background-color: #f5f5f5;
5+
border-radius: 6px;
6+
padding: 16px;
7+
margin: 16px 0;
8+
overflow-x: auto;
9+
}
10+
11+
.rst-content pre code {
12+
background-color: #f5f5f5;
13+
white-space: pre;
14+
border: none;
15+
padding: 0;
16+
}

docs/sphinx/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
pygments_style = "sphinx"
4545

4646
html_theme = "sphinx_rtd_theme"
47+
html_static_path = ["_static"]
48+
html_css_files = ["css/custom.css"]
4749

4850
intersphinx_mapping = {
4951
"python": ("https://docs.python.org/3", None),

0 commit comments

Comments
 (0)