mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Restore docutils compatibility.
This commit is contained in:
parent
b809740f66
commit
536476287e
@ -303,11 +303,11 @@ class HTMLTranslator(BaseTranslator):
|
||||
if node['uri'].lower().endswith('svg') or \
|
||||
node['uri'].lower().endswith('svgz'):
|
||||
atts = {'data': node['uri'], 'type': 'image/svg+xml'}
|
||||
if 'width' in node:
|
||||
if node.has_key('width'):
|
||||
atts['width'] = node['width']
|
||||
if 'height' in node:
|
||||
if node.has_key('height'):
|
||||
atts['height'] = node['height']
|
||||
if 'align' in node:
|
||||
if node.has_key('align'):
|
||||
self.body.append('<div align="%s" class="align-%s">' %
|
||||
(node['align'], node['align']))
|
||||
self.context.append('</div>\n')
|
||||
|
@ -254,7 +254,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
# ... and all others are the appendices
|
||||
self.body.append('\n\\appendix\n')
|
||||
self.first_document = -1
|
||||
if 'docname' in node:
|
||||
if node.has_key('docname'):
|
||||
self.body.append('\\hypertarget{--doc-%s}{}' % node['docname'])
|
||||
# "- 1" because the level is increased before the title is visited
|
||||
self.sectionlevel = self.top_sectionlevel - 1
|
||||
|
Loading…
Reference in New Issue
Block a user