##// END OF EJS Templates
templater: remove cStringIO for fill
Matt Mackall -
r3633:bf3dec18 default
parent child Browse files
Show More
@@ -204,11 +204,8 b' def fill(text, width):'
204 yield text[start:m.start(0)], m.group(1)
204 yield text[start:m.start(0)], m.group(1)
205 start = m.end(1)
205 start = m.end(1)
206
206
207 fp = cStringIO.StringIO()
207 return "".join([space_re.sub(' ', textwrap.fill(para, width)) + rest
208 for para, rest in findparas():
208 for para, rest in findparas()])
209 fp.write(space_re.sub(' ', textwrap.fill(para, width)))
210 fp.write(rest)
211 return fp.getvalue()
212
209
213 def firstline(text):
210 def firstline(text):
214 '''return the first line of text'''
211 '''return the first line of text'''
General Comments 0
You need to be logged in to leave comments. Login now