Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bae72c0

Browse files
committed
Reduce amount of indentation.
1 parent ccd009c commit bae72c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/backends/backend_svg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def start(self, tag, attrib={}, **extra):
122122
tag = escape_cdata(tag)
123123
self.__data = []
124124
self.__tags.append(tag)
125-
self.__write(u" " * len(self.__tags))
125+
self.__write(u" " * (len(self.__tags) - 1))
126126
self.__write(u"<%s" % tag)
127127
if attrib or extra:
128128
attrib = attrib.copy()
@@ -144,7 +144,7 @@ def start(self, tag, attrib={}, **extra):
144144

145145
def comment(self, comment):
146146
self.__flush()
147-
self.__write(u" " * (len(self.__tags) + 1))
147+
self.__write(u" " * (len(self.__tags)))
148148
self.__write(u"<!-- %s -->\n" % escape_cdata(comment))
149149

150150
##
@@ -177,7 +177,7 @@ def end(self, tag=None, indent=True):
177177
self.__write(u"/>\n")
178178
return
179179
if indent:
180-
self.__write(u" " * (len(self.__tags) + 1))
180+
self.__write(u" " * (len(self.__tags)))
181181
self.__write(u"</%s>\n" % tag)
182182

183183
##

0 commit comments

Comments
 (0)