summaryrefslogtreecommitdiffstats
path: root/Doc/tools
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-08-22 15:25:16 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2014-08-22 15:25:16 (GMT)
commitadc5634193349af08f64bcc7e998001b1ed90eca (patch)
tree5ebd3fc874727068ba11d62cb99679d89bf6e4b6 /Doc/tools
parent145759c89204a8f327bccb2968ab180a8408281e (diff)
parenteb265ab873b6341444f0a5fc3967572688fafe62 (diff)
downloadcpython-adc5634193349af08f64bcc7e998001b1ed90eca.zip
cpython-adc5634193349af08f64bcc7e998001b1ed90eca.tar.gz
cpython-adc5634193349af08f64bcc7e998001b1ed90eca.tar.bz2
Issue #22150: Fix deprecated-removed directive in Sphinx 1.2.
Diffstat (limited to 'Doc/tools')
-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 e37ef89..3e80e12 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 {