Skip to content

Commit 3b6556b

Browse files
committed
PEP 12: Update outdated image and comment formatting guidance
1 parent 9422588 commit 3b6556b

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

pep-0012.rst

+22-14
Original file line numberDiff line numberDiff line change
@@ -568,35 +568,43 @@ the numbers will always match.
568568
Images
569569
------
570570

571-
If your PEP contains a diagram, you may include it in the processed
572-
output using the "image" directive::
571+
If your PEP contains a diagram or other graphic, you may include it in the
572+
processed output using the ``image`` directive:
573+
574+
.. code-block:: rst
573575
574576
.. image:: diagram.png
575577
576-
Any browser-friendly graphics format is possible: .png, .jpeg, .gif,
577-
.tiff, etc.
578+
Any browser-friendly graphics format is possible; PNG should be
579+
preferred for graphics, JPEG for photos and GIF for animations.
580+
Currently, SVG must be avoided due to compatibility issues with the
581+
PEP build system.
582+
583+
For accessibility and readers of the source text, you should include
584+
a description of the image and any key information contained within
585+
using the ``:alt:`` option to the ``image`` directive:
586+
587+
.. code-block:: rst
578588
579-
Since this image will not be visible to readers of the PEP in source
580-
text form, you should consider including a description or ASCII art
581-
alternative, using a comment (below).
589+
.. image:: dataflow.png
590+
:alt: Data flows from the input module, through the "black box"
591+
module, and finally into (and through) the output module.
582592
583593
584594
Comments
585595
--------
586596

587-
A comment block is an indented block of arbitrary text immediately
597+
A comment is an indented block of arbitrary text immediately
588598
following an explicit markup start: two periods and whitespace. Leave
589599
the ".." on a line by itself to ensure that the comment is not
590600
misinterpreted as another explicit markup construct. Comments are not
591-
visible in the processed document. For the benefit of those reading
592-
your PEP in source form, please consider including a descriptions of
593-
or ASCII art alternatives to any images you include. For example::
601+
visible in the processed document. For example:
594602

595-
.. image:: dataflow.png
603+
.. code-block:: rst
596604
597605
..
598-
Data flows from the input module, through the "black box"
599-
module, and finally into (and through) the output module.
606+
This section should be updated in the final PEP.
607+
Ensure the date is accurate.
600608
601609
The Emacs stanza at the bottom of this document is inside a comment.
602610

0 commit comments

Comments
 (0)