Skip to content

Commit 71ced71

Browse files
committed
Fix syntax highlighting
1 parent 6d4e40e commit 71ced71

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

README.rst

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,18 @@ In order to enforce that the output is deterministic, you will need to do the fo
293293
PNG
294294
^^^
295295

296-
For PNG files, the output can be made deterministic by setting::
296+
For PNG files, the output can be made deterministic by setting:
297+
298+
.. code:: python
297299
298300
@pytest.mark.mpl_image_compare(savefig_kwargs={'metadata': {"Software": None}})
299301
300302
PDF
301303
^^^
302304

303-
For PDF files, the output can be made deterministic by setting::
305+
For PDF files, the output can be made deterministic by setting:
306+
307+
.. code:: python
304308
305309
@pytest.mark.mpl_image_compare(savefig_kwargs={'format': 'pdf',
306310
'metadata': {"Creator": None,
@@ -310,13 +314,17 @@ For PDF files, the output can be made deterministic by setting::
310314
EPS
311315
^^^
312316

313-
For PDF files, the output can be made deterministic by setting::
317+
For PDF files, the output can be made deterministic by setting:
318+
319+
.. code:: python
314320
315321
@pytest.mark.mpl_image_compare(savefig_kwargs={'format': 'pdf',
316322
'metadata': {"Creator": "test"})
317323
318324
and in addition you will need to set the SOURCE_DATE_EPOCH environment variable to
319-
a constant value (this is a unit timestamp)::
325+
a constant value (this is a unit timestamp):
326+
327+
.. code:: python
320328
321329
os.environ['SOURCE_DATE_EPOCH'] = '1680254601'
322330
@@ -325,11 +333,15 @@ You could do this inside the test.
325333
SVG
326334
^^^
327335
328-
For SVG files, the output can be made deterministic by setting::
336+
For SVG files, the output can be made deterministic by setting:
337+
338+
.. code:: python
329339
330340
@pytest.mark.mpl_image_compare(savefig_kwargs={'metadata': '{"Date": None}})
331341
332-
and in addition, you should make sure the following rcParam is set to a constant string::
342+
and in addition, you should make sure the following rcParam is set to a constant string:
343+
344+
.. code:: python
333345
334346
plt.rcParams['svg.hashsalt'] = 'test'
335347

0 commit comments

Comments
 (0)