Skip to content

Commit

Permalink
Correct CSS class for generated HTML elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
philexander committed Apr 14, 2019
1 parent a42134f commit 35af079
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sphinxcontrib/tikz.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ def html_visit_tikzinline(self, node):
raise nodes.SkipNode
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="pre">%s</span>' %
self.encode(node['tikz']).strip())
else:
self.body.append('<img class="math" src="%s" alt="%s"/>' %
self.body.append('<img src="%s" alt="%s"/>' %
(fname, self.encode(node['tikz']).strip()))
raise nodes.SkipNode

Expand All @@ -326,7 +326,7 @@ def html_visit_tikz(self, node):
raise nodes.SkipNode
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="pre">%s</span>' %
self.encode(node['tikz']).strip())
else:
self.body.append(self.starttag(node, 'div', CLASS='figure'))
Expand Down

0 comments on commit 35af079

Please sign in to comment.