1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00

metadata: allow links spanning multiple lines

This allows for nicer text wrapping.
This commit is contained in:
Daniel Martí 2015-09-11 22:07:20 -07:00
parent e6b14c8995
commit 223db1588b

View File

@ -286,8 +286,9 @@ class DescriptionFormatter:
def endpara(self): def endpara(self):
self.text_html += '</p>' self.text_html += '</p>'
self.state = self.stNONE self.state = self.stNONE
self.text_txt += textwrap.fill(' '.join(self.para_lines), 80) whole_para = ' '.join(self.para_lines)
self.text_txt += '\n\n' self.addtext(whole_para)
self.text_txt += textwrap.fill(whole_para, 80) + '\n\n'
del self.para_lines[:] del self.para_lines[:]
def endul(self): def endul(self):
@ -402,7 +403,6 @@ class DescriptionFormatter:
self.state = self.stPARA self.state = self.stPARA
elif self.state == self.stPARA: elif self.state == self.stPARA:
self.text_html += ' ' self.text_html += ' '
self.addtext(line)
def end(self): def end(self):
self.endcur() self.endcur()