summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-08-22 15:24:29 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2014-08-22 15:24:29 (GMT)
commiteb265ab873b6341444f0a5fc3967572688fafe62 (patch)
tree82c92f7a5c629bd4a0316ba7ed6515d5a1655593 /Doc
parent14ad5319d94901f6a74169f448badcf67f37c6ab (diff)
downloadcpython-eb265ab873b6341444f0a5fc3967572688fafe62.zip
cpython-eb265ab873b6341444f0a5fc3967572688fafe62.tar.gz
cpython-eb265ab873b6341444f0a5fc3967572688fafe62.tar.bz2
Issue #22150: Fix deprecated-removed directive in Sphinx 1.2.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tools/sphinxext/pyspecific.py5
-rw-r--r--Doc/tools/sphinxext/static/basic.css1
2 files changed, 5 insertions, 1 deletions
diff --git a/Doc/tools/sphinxext/pyspecific.py b/Doc/tools/sphinxext/pyspecific.py
index 31d8c06..9e251d4 100644
--- a/Doc/tools/sphinxext/pyspecific.py
+++ b/Doc/tools/sphinxext/pyspecific.py
@@ -180,7 +180,10 @@ class DeprecatedRemoved(Directive):
elif not SPHINX11:
para = nodes.paragraph('', '',
nodes.inline('', '%s.' % text, classes=['versionmodified']))
- node.append(para)
+ if len(node):
+ node.insert(0, para)
+ else:
+ node.append(para)
env = self.state.document.settings.env
env.note_versionchange('deprecated', version[0], node, self.lineno)
return [node] + messages
diff --git a/Doc/tools/sphinxext/static/basic.css b/Doc/tools/sphinxext/static/basic.css
index 3242a81..dd1a9d4 100644
--- a/Doc/tools/sphinxext/static/basic.css
+++ b/Doc/tools/sphinxext/static/basic.css
@@ -344,6 +344,7 @@ dl.glossary dt {
div.deprecated p, div.deprecated-removed p {
margin-bottom: 0;
+ margin-top: 0;
}
.system-message {