Dolda2000 GitWeb
/
wrw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ff79cdb
)
Backported indent-encoding fix.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 13 May 2012 02:12:25 +0000
(
04:12
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 13 May 2012 02:12:25 +0000
(
04:12
+0200)
wrw/sp/util.py
patch
|
blob
|
blame
|
history
diff --git
a/wrw/sp/util.py
b/wrw/sp/util.py
index
96e9880
..
f387f1c
100644
(file)
--- a/
wrw/sp/util.py
+++ b/
wrw/sp/util.py
@@
-183,18
+183,21
@@
class indenter(formatter):
reind = False
if not self.simple(el):
sub = self.update(curind=self.curind + self.indent)
reind = False
if not self.simple(el):
sub = self.update(curind=self.curind + self.indent)
- sub.
out.indent(sub.curind
)
+ sub.
reindent(
)
reind = True
for ch in el.children:
sub.node(ch)
if reind:
reind = True
for ch in el.children:
sub.node(ch)
if reind:
- self.
out.indent(self.curind
)
+ self.
reindent(
)
self.endtag(el)
def element(self, el, **extra):
super(indenter, self).element(el, **extra)
if self.out.col > 80 and self.simple(el):
self.endtag(el)
def element(self, el, **extra):
super(indenter, self).element(el, **extra)
if self.out.col > 80 and self.simple(el):
- self.out.indent(self.curind)
+ self.reindent()
+
+ def reindent(self):
+ self.out.indent(self.curind.encode(self.charset))
def start(self):
super(indenter, self).start()
def start(self):
super(indenter, self).start()