jump newline when ending a <p> element in html. Fixes #6880
This commit is contained in:
parent
611eb69e73
commit
404ca3a68f
|
@ -794,7 +794,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
||||||
elif name in ('a', 'img', 'body', 'html'):
|
elif name in ('a', 'img', 'body', 'html'):
|
||||||
pass
|
pass
|
||||||
elif name in INLINE:
|
elif name in INLINE:
|
||||||
self._jump_line()
|
pass
|
||||||
else:
|
else:
|
||||||
log.warning('Unhandled element "%s"' % name)
|
log.warning('Unhandled element "%s"' % name)
|
||||||
|
|
||||||
|
@ -830,6 +830,8 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
||||||
elif name in BLOCK:
|
elif name in BLOCK:
|
||||||
if name == 'pre':
|
if name == 'pre':
|
||||||
endPreserving = True
|
endPreserving = True
|
||||||
|
elif name in BLOCK_STRUCT:
|
||||||
|
newLine = True
|
||||||
else:
|
else:
|
||||||
log.warning("Unhandled element '%s'" % name)
|
log.warning("Unhandled element '%s'" % name)
|
||||||
self._flush_text()
|
self._flush_text()
|
||||||
|
@ -838,8 +840,6 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
||||||
if newLine:
|
if newLine:
|
||||||
self._jump_line()
|
self._jump_line()
|
||||||
self._end_span()
|
self._end_span()
|
||||||
#if not self._starts_line():
|
|
||||||
# self.text = ' '
|
|
||||||
|
|
||||||
class HtmlTextView(gtk.TextView):
|
class HtmlTextView(gtk.TextView):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue