added the encoding of reStructuredText Description - using a RFC822-compatible folding/unfolding technique

This commit is contained in:
Tarek Ziadé 2009-12-25 13:29:11 +00:00
parent 238dcaf2eb
commit 3e07e8623b
1 changed files with 19 additions and 5 deletions

View File

@ -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 field as-is. This means that authors should be conservative in
the markup they use. 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:: Example::
Description: This module collects votes from beagles Description: This project provides powerful math functions
in order to determine their electoral wishes. |For example, you can use `sum()` to sum numbers:
Do *not* try to use this module with basset hounds; |
it makes them grumpy. |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) Keywords (optional)
@ -517,7 +530,8 @@ Version 1.1 is specified in PEP 314.
.. _`PEP 386`: http://www.python.org/dev/peps/pep-0386 .. _`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 Copyright
========= =========