From 536476287e1c4e4332cf160ade3b72150611a127 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 9 Jul 2009 11:59:52 +0200 Subject: [PATCH] Restore docutils compatibility. --- sphinx/writers/html.py | 6 +++--- sphinx/writers/latex.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py index 81df395bd..76c03c7b1 100644 --- a/sphinx/writers/html.py +++ b/sphinx/writers/html.py @@ -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('
' % (node['align'], node['align'])) self.context.append('
\n') diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 1b6d4026f..3ebdb3df2 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -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