jump newline when ending a <p> element in html. Fixes #6880

This commit is contained in:
Yann Leboulanger 2011-07-24 21:45:57 +02:00
parent 611eb69e73
commit 404ca3a68f
1 changed files with 3 additions and 3 deletions

View File

@ -794,7 +794,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
elif name in ('a', 'img', 'body', 'html'):
pass
elif name in INLINE:
self._jump_line()
pass
else:
log.warning('Unhandled element "%s"' % name)
@ -830,6 +830,8 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
elif name in BLOCK:
if name == 'pre':
endPreserving = True
elif name in BLOCK_STRUCT:
newLine = True
else:
log.warning("Unhandled element '%s'" % name)
self._flush_text()
@ -838,8 +840,6 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
if newLine:
self._jump_line()
self._end_span()
#if not self._starts_line():
# self.text = ' '
class HtmlTextView(gtk.TextView):