1. Hong Minhee
  2. Sphinx


Kacper Kowalik  committed 8f0aca7

Fixed encoding for Python 3

  • Participants
  • Parent commits b9be477
  • Branches stable

Comments (0)

Files changed (1)

File sphinx/ext/graphviz.py

View file
  • Ignore whitespace
                                  (fname, alt, imgcss))
                 # has a map: get the name of the map and connect the parts
-                mapname = mapname_re.match(imgmap[0]).group(1)
+                mapname = mapname_re.match(imgmap[0].decode('utf-8')).group(1)
                 self.body.append('<img src="%s" alt="%s" usemap="#%s" %s/>\n' %
                                  (fname, alt, mapname, imgcss))
-                self.body.extend(imgmap)
+                self.body.extend([item.decode('utf-8') for item in imgmap])
         if node.get('caption') and not inline:
             self.body.append('</p>\n<p class="caption">')