From 5569f89de24e86b37a050065a61f27217861b5f4 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 9 Jul 2009 12:08:42 +0200 Subject: [PATCH] #210: Fix nesting of HTML tags for displayed math from pngmath extension. --- CHANGES | 3 +++ sphinx/ext/pngmath.py | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 8ba49d5f4..13b096f4c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ Release 0.6.3 (in development) ============================== +* #210: Fix nesting of HTML tags for displayed math from pngmath + extension. + * #213: Fix centering of images in LaTeX output. * #211: Fix compatibility with docutils 0.5. diff --git a/sphinx/ext/pngmath.py b/sphinx/ext/pngmath.py index 8816e5bb9..b9353d7f5 100644 --- a/sphinx/ext/pngmath.py +++ b/sphinx/ext/pngmath.py @@ -223,12 +223,11 @@ def html_visit_displaymath(self, node): self.body.append('(%s)' % node['number']) if fname is None: # something failed -- use text-only as a bad substitute - self.body.append('%s' % + self.body.append('%s

\n' % self.encode(node['latex']).strip()) else: - self.body.append('%s\n' % + self.body.append('%s

\n' % (fname, self.encode(node['latex']).strip())) - self.body.append('

') raise nodes.SkipNode