Conflicts:
wrw/sp/util.py
self.inline = False
self.stack = []
self.last = None, None
+ self.lastendbr = True
def write(self, text):
- lines = text.split(u"\n")
+ lines = text.split("\n")
if len(lines) > 1:
for ln in lines[:-1]:
self.buf.extend(ln.encode(self.charset))
def endtag(self, el):
il = self.inline
self.pop()
- if not il:
+ if il or (self.last[0] == ">" and self.last[1] == el):
+ self.lastendbr = False
+ else:
self.br()
- super(indenter, self).endtag(el)
+ self.lastendbr = True
+ super().endtag(el)
def start(self, el):
- super(indenter, self).start(el)
+ super().start(el)
self.atbreak = True
def end(self, el):