Fix renderer

This commit is contained in:
Tim Bentley 2010-11-01 19:33:33 +00:00
parent 206eb1006e
commit f7ddb507e8

View File

@ -116,18 +116,19 @@ class Renderer(object):
html_text = u''
styled_text = u''
for line in text:
styled_line = expand_tags(line)
if styled_text:
styled_text += line_end + styled_line
styled_line = expand_tags(line) + line_end
styled_text += styled_line
html = self.page_shell + styled_text + u'</div></body></html>'
self.web.setHtml(html)
# Text too long so go to next page
if self.web_frame.contentsSize().height() > self.page_height:
if html_text.endswith(u'<br>'):
html_text = html_text[:len(html_text)-4]
formatted.append(html_text)
html_text = u''
styled_text = styled_line
html_text += line + line_end
if line_break:
if html_text.endswith(u'<br>'):
html_text = html_text[:len(html_text)-4]
formatted.append(html_text)
log.debug(u'format_slide - End')