added the encoding of reStructuredText Description - using a RFC822-compatible folding/unfolding technique
This commit is contained in:
parent
238dcaf2eb
commit
3e07e8623b
24
pep-0345.txt
24
pep-0345.txt
|
@ -127,12 +127,25 @@ markup is optional; programs can also display the contents of the
|
|||
field as-is. This means that authors should be conservative in
|
||||
the markup they use.
|
||||
|
||||
To support empty lines and lines with indentation with respect to
|
||||
the RFC 822 format, any new line has to be suffixed by 7 spaces
|
||||
followed by a pipe (`|`) char. As a result, the Description field is
|
||||
encoded into a folded field that can be interpreted by RFC822
|
||||
parser [2]_.
|
||||
|
||||
Example::
|
||||
|
||||
Description: This module collects votes from beagles
|
||||
in order to determine their electoral wishes.
|
||||
Do *not* try to use this module with basset hounds;
|
||||
it makes them grumpy.
|
||||
Description: This project provides powerful math functions
|
||||
|For example, you can use `sum()` to sum numbers:
|
||||
|
|
||||
|Example::
|
||||
|
|
||||
| >>> sum(1, 2)
|
||||
| 3
|
||||
|
|
||||
|
||||
This encoding implies that any occurences of ``\n |`` have to be replaced
|
||||
by ``\n`` when the field is unfolded using a RFC822 reader.
|
||||
|
||||
|
||||
Keywords (optional)
|
||||
|
@ -517,7 +530,8 @@ Version 1.1 is specified in PEP 314.
|
|||
|
||||
.. _`PEP 386`: http://www.python.org/dev/peps/pep-0386
|
||||
|
||||
|
||||
.. [2] RFC 822 Long Header Fields:
|
||||
http://www.freesoft.org/CIE/RFC/822/7.htm
|
||||
|
||||
Copyright
|
||||
=========
|
||||
|
|
Loading…
Reference in New Issue