8000 PEP 12: Further reduce excess detail and examples in hyperlinks section · python/peps@fa28adb · GitHub
[go: up one dir, main page]

Skip to content

Commit fa28adb

Browse files
committed
PEP 12: Further reduce excess detail and examples in hyperlinks section
1 parent bdee439 commit fa28adb

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed

pep-0012.rst

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -442,17 +442,11 @@ links wherever available.
442442
Hyperlink references use backquotes and a trailing underscore to mark
443443
up the reference text; backquotes are optional if the reference text
444444
is a single word. For example, to reference a hyperlink target named
445-
``Python web site``, you would write:
445+
``Python website``, you would write:
446446

447447
.. code-block:: rst
448448
449-
In this paragraph, we refer to the `Python web site`_.
450-
451-
which renders as:
452-
453-
In this paragraph, we refer to the `Python web site`_.
454-
455-
.. _Python web site: https://www.python.org/
449+
In this paragraph, we refer to the `Python website`_.
456450
457451
If you intend to only reference a link once, and want to define it inline
458452
with the text, insert the link into angle brackets (``<>``) after the text
@@ -465,27 +459,17 @@ reference to avoid conflicting with other target names. For example:
465459
466460
Visit the `website <https://www.python.org/>`__ for more.
467461
468-
which displays as:
469-
470-
Visit the `website <https://www.python.org/>`__ for more.
471-
472462
If you want to use one link multiple places with different linked text,
473463
or want to ensure you don't have to update your link target names when
474464
changing the linked text, include the target name within angle brackets
475465
following the text to link, *with an underscore after the target name
476466
but before the closing angle bracket* (or the link **will not work**).
477-
478467
For example:
479468

480469
.. code-block:: rst
470+
:class: test-class
481471
482-
For further examples, see the `documentation <pydocs_>`_.
483-
484-
which like the above, renders as:
485-
486-
For further examples, see the `documentation <pydocs_>`_.
487-
488-
.. _pydocs: https://docs.python.org/
472+
For further examples, see the `documentation <pydocs_>`_.
489473
490474
An explicit target provides the URL. Put targets in the Footnotes section
491475
at the end of the PEP, or immediately after the paragraph with the reference.
@@ -552,6 +536,10 @@ For example:
552536
553537
Refer to The TeXbook [#TeXbook]_ for more information.
554538
539+
which renders as
540+
541+
Refer to The TeXbook [#TeXbook]_ for more information.
542+
555543
Whitespace must precede the footnote reference. Leave a space between
556544
the footnote reference and the preceding word.
557545

@@ -566,8 +554,9 @@ followed by the footnote body. For example:
566554

567555
.. code-block:: rst
568556
569-
Footnotes
570-
=========
557+
.. [#TeXbook] Donald Knuth's *The TeXbook*, pages 195 and 196.
558+
559+
which renders as
571560

572561
.. [#TeXbook] Donald Knuth's *The TeXbook*, pages 195 and 196.
573562

0 commit comments

Comments
 (0)
0