Commits

Georg Brandl committed 6872f1a

#210: Fix nesting of HTML tags for displayed math from pngmath extension.

  • Participants
  • Parent commits 3547331

Comments (0)

Files changed (2)

 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.

File sphinx/ext/pngmath.py

         self.body.append('<span class="eqno">(%s)</span>' % node['number'])
     if fname is None:
         # something failed -- use text-only as a bad substitute
-        self.body.append('<span class="math">%s</span>' %
+        self.body.append('<span class="math">%s</span></p>\n</div>' %
                          self.encode(node['latex']).strip())
     else:
-        self.body.append('<img src="%s" alt="%s" />\n</div>' %
+        self.body.append('<img src="%s" alt="%s" /></p>\n</div>' %
                          (fname, self.encode(node['latex']).strip()))
-    self.body.append('</p>')
     raise nodes.SkipNode