Support the 'Sponsor' header field (#911)

This commit is contained in:
Brett Cannon 2019-03-04 17:33:37 -08:00 committed by GitHub
parent c3e468c2e8
commit a7160d6358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ def fixfile(inpath, input_lines, outfile):
print('</td></tr></table>', file=outfile) print('</td></tr></table>', file=outfile)
print('<div class="header">\n<table border="0">', file=outfile) print('<div class="header">\n<table border="0">', file=outfile)
for k, v in header: for k, v in header:
if k.lower() in ('author', 'bdfl-delegate', 'discussions-to'): if k.lower() in ('author', 'bdfl-delegate', 'discussions-to', 'sponsor'):
mailtos = [] mailtos = []
for part in re.split(r',\s*', v): for part in re.split(r',\s*', v):
if '@' in part: if '@' in part:
@ -401,7 +401,7 @@ class PEPHeaders(Transform):
# empty # empty
continue continue
para = body[0] para = body[0]
if name in ('author', 'bdfl-delegate'): if name in ('author', 'bdfl-delegate', 'sponsor'):
for node in para: for node in para:
if isinstance(node, nodes.reference): if isinstance(node, nodes.reference):
node.replace_self(peps.mask_email(node)) node.replace_self(peps.mask_email(node))