Skip to content

Commit 63ebcb0

Browse files
committed
docs: fix docs color styling
1 parent 107f983 commit 63ebcb0

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import os
1414
import sys
1515

16-
sys.path.insert(0, os.path.abspath("."))
16+
sys.path.insert(0, os.path.abspath("../.."))
1717
sys.path.append(os.path.abspath("extensions"))
1818

1919

docs/source/generate_style_list.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def generate_style_list():
3636
)
3737
style_heading = f"`{style}`\n" + "~" * len(f"`{style}`")
3838
output_example = indent_all_lines(full + "\n\n" + body_only)
39-
style_list += f"{style_heading}\n\n::\n\n{output_example}\n\n"
39+
style_list += f"{style_heading}\n\n.. code-block:: none\n\n{output_example}\n\n"
4040
# put it all together
4141
return f"{heading}\n\n{table_of_contents}\n{style_list}"
4242

@@ -49,4 +49,5 @@ def write_to_file(filename, content):
4949

5050
if __name__ == "__main__":
5151
content = generate_style_list()
52-
write_to_file(os.path.join("docs", "source", "styles.rst"), content)
52+
write_to_file(os.path.join(os.path.dirname(__file__), "styles.rst"), content)
53+
print("Successfully generated styles.rst")

docs/source/styles.rst

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Preset styles
88
`ascii`
99
~~~~~~~
1010

11-
::
11+
.. code-block:: none
1212
1313
+-----+-----------------------+
1414
| # | G H R S |
@@ -29,7 +29,7 @@ Preset styles
2929
`ascii_borderless`
3030
~~~~~~~~~~~~~~~~~~
3131

32-
::
32+
.. code-block:: none
3333
3434
# | G H R S
3535
----- ----- ----- ----- -----
@@ -44,7 +44,7 @@ Preset styles
4444
`ascii_box`
4545
~~~~~~~~~~~
4646

47-
::
47+
.. code-block:: none
4848
4949
+-----+-----+-----+-----+-----+
5050
| # | G | H | R | S |
@@ -65,7 +65,7 @@ Preset styles
6565
`ascii_compact`
6666
~~~~~~~~~~~~~~~
6767

68-
::
68+
.. code-block:: none
6969
7070
+-----+-----------------------+
7171
| # | G H R S |
@@ -84,7 +84,7 @@ Preset styles
8484
`ascii_double`
8585
~~~~~~~~~~~~~~
8686

87-
::
87+
.. code-block:: none
8888
8989
+-----+-----------------------+
9090
| # | G H R S |
@@ -105,7 +105,7 @@ Preset styles
105105
`ascii_minimalist`
106106
~~~~~~~~~~~~~~~~~~
107107

108-
::
108+
.. code-block:: none
109109
110110
-----------------------------
111111
# | G H R S
@@ -126,7 +126,7 @@ Preset styles
126126
`ascii_simple`
127127
~~~~~~~~~~~~~~
128128

129-
::
129+
.. code-block:: none
130130
131131
===== ===== ===== ===== =====
132132
# | G H R S
@@ -145,7 +145,7 @@ Preset styles
145145
`borderless`
146146
~~~~~~~~~~~~
147147

148-
::
148+
.. code-block:: none
149149
150150
# ┃ G H R S
151151
━━━━━ ━━━━━ ━━━━━ ━━━━━ ━━━━━
@@ -160,7 +160,7 @@ Preset styles
160160
`double`
161161
~~~~~~~~
162162

163-
::
163+
.. code-block:: none
164164
165165
╔═════╦═══════════════════════╗
166166
║ # ║ G H R S ║
@@ -181,7 +181,7 @@ Preset styles
181181
`double_box`
182182
~~~~~~~~~~~~
183183

184-
::
184+
.. code-block:: none
185185
186186
╔═════╦═════╦═════╦═════╦═════╗
187187
║ # ║ G ║ H ║ R ║ S ║
@@ -202,7 +202,7 @@ Preset styles
202202
`double_compact`
203203
~~~~~~~~~~~~~~~~
204204

205-
::
205+
.. code-block:: none
206206
207207
╔═════╦═══════════════════════╗
208208
║ # ║ G H R S ║
@@ -221,7 +221,7 @@ Preset styles
221221
`double_thin_compact`
222222
~~~~~~~~~~~~~~~~~~~~~
223223

224-
::
224+
.. code-block:: none
225225
226226
╔═════╦═══════════════════════╗
227227
║ # ║ G H R S ║
@@ -240,7 +240,7 @@ Preset styles
240240
`markdown`
241241
~~~~~~~~~~
242242

243-
::
243+
.. code-block:: none
244244
245245
| # | G | H | R | S |
246246
|-----|-----|-----|-----|-----|
@@ -255,7 +255,7 @@ Preset styles
255255
`minimalist`
256256
~~~~~~~~~~~~
257257

258-
::
258+
.. code-block:: none
259259
260260
─────────────────────────────
261261
# │ G H R S
@@ -276,7 +276,7 @@ Preset styles
276276
`simple`
277277
~~~~~~~~
278278

279-
::
279+
.. code-block:: none
280280
281281
═════ ═════ ═════ ═════ ═════
282282
# ║ G H R S
@@ -295,7 +295,7 @@ Preset styles
295295
`thick`
296296
~~~~~~~
297297

298-
::
298+
.. code-block:: none
299299
300300
┏━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
301301
┃ # ┃ G H R S ┃
@@ -316,7 +316,7 @@ Preset styles
316316
`thick_box`
317317
~~~~~~~~~~~
318318

319-
::
319+
.. code-block:: none
320320
321321
┏━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┓
322322
┃ # ┃ G ┃ H ┃ R ┃ S ┃
@@ -337,7 +337,7 @@ Preset styles
337337
`thick_compact`
338338
~~~~~~~~~~~~~~~
339339

340-
::
340+
.. code-block:: none
341341
342342
┏━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
343343
┃ # ┃ G H R S ┃
@@ -356,7 +356,7 @@ Preset styles
356356
`thin`
357357
~~~~~~
358358

359-
::
359+
.. code-block:: none
360360
361361
┌─────┬───────────────────────┐
362362
│ # │ G H R S │
@@ -377,7 +377,7 @@ Preset styles
377377
`thin_box`
378378
~~~~~~~~~~
379379

380-
::
380+
.. code-block:: none
381381
382382
┌─────┬─────┬─────┬─────┬─────┐
383383
│ # │ G │ H │ R │ S │
@@ -398,7 +398,7 @@ Preset styles
398398
`thin_compact`
399399
~~~~~~~~~~~~~~
400400

401-
::
401+
.. code-block:: none
402402
403403
┌─────┬───────────────────────┐
404404
│ # │ G H R S │
@@ -417,7 +417,7 @@ Preset styles
417417
`thin_compact_rounded`
418418
~~~~~~~~~~~~~~~~~~~~~~
419419

420-
::
420+
.. code-block:: none
421421
422422
╭─────┬───────────────────────╮
423423
│ # │ G H R S │
@@ -436,7 +436,7 @@ Preset styles
436436
`thin_double`
437437
~~~~~~~~~~~~~
438438

439-
::
439+
.. code-block:: none
440440
441441
┌─────┬───────────────────────┐
442442
│ # │ G H R S │
@@ -457,7 +457,7 @@ Preset styles
457457
`thin_double_rounded`
458458
~~~~~~~~~~~~~~~~~~~~~
459459

460-
::
460+
.. code-block:: none
461461
462462
╭─────┬───────────────────────╮
463463
│ # │ G H R S │
@@ -478,7 +478,7 @@ Preset styles
478478
`thin_rounded`
479479
~~~~~~~~~~~~~~
480480

481-
::
481+
.. code-block:: none
482482
483483
╭─────┬───────────────────────╮
484484
│ # │ G H R S │
@@ -499,7 +499,7 @@ Preset styles
499499
`thin_thick`
500500
~~~~~~~~~~~~
501501

502-
::
502+
.. code-block:: none
503503
504504
┌─────┬───────────────────────┐
505505
│ # │ G H R S │
@@ -520,7 +520,7 @@ Preset styles
520520
`thin_thick_rounded`
521521
~~~~~~~~~~~~~~~~~~~~
522522

523-
::
523+
.. code-block:: none
524524
525525
╭─────┬───────────────────────╮
526526
│ # │ G H R S │

0 commit comments

Comments
 (0)