mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Merged revisions 62246-62259 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62246 | georg.brandl | 2008-04-09 19:57:38 +0200 (Mi, 09 Apr 2008) | 2 lines #2585: initialize code attribute of HTTPError. ........ r62247 | georg.brandl | 2008-04-09 19:58:56 +0200 (Mi, 09 Apr 2008) | 2 lines Add :issue: directive for easy linking to bugs.python.org. ........ r62249 | gregory.p.smith | 2008-04-09 20:18:43 +0200 (Mi, 09 Apr 2008) | 2 lines Add a note about the zlib.decompressobj().flush() fix. ........ r62255 | martin.v.loewis | 2008-04-09 20:56:20 +0200 (Mi, 09 Apr 2008) | 2 lines Package wininst*.exe from distutils/command. ........ r62259 | andrew.kuchling | 2008-04-10 00:28:43 +0200 (Do, 10 Apr 2008) | 1 line Try out the new issue role. Thanks, Georg! ........
This commit is contained in:
parent
3de92bf155
commit
5680d0c5e3
5 changed files with 28 additions and 7 deletions
24
Doc/tools/sphinxext/pyspecific.py
Normal file
24
Doc/tools/sphinxext/pyspecific.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
pyspecific.py
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Sphinx extension with Python doc-specific markup.
|
||||
|
||||
:copyright: 2008 by Georg Brandl.
|
||||
:license: Python license.
|
||||
"""
|
||||
|
||||
ISSUE_URI = 'http://bugs.python.org/issue%s'
|
||||
|
||||
from docutils import nodes, utils
|
||||
|
||||
def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
|
||||
issue = utils.unescape(text)
|
||||
text = 'issue ' + issue
|
||||
refnode = nodes.reference(text, text, refuri=ISSUE_URI % issue)
|
||||
return [refnode], []
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_role('issue', issue_role)
|
||||
Loading…
Add table
Add a link
Reference in a new issue