mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-27 22:23:52 +02:00
Fix #1681. Handle HTML "style" attributes which begin with a ";".
This commit is contained in:
parent
ff5398c435
commit
6cc4432cb7
1 changed files with 4 additions and 1 deletions
|
|
@ -277,7 +277,10 @@ def _update_cssdict(self, cssdict):
|
|||
def _apply_style_attr(self):
|
||||
attrib = self._element.attrib
|
||||
if 'style' in attrib:
|
||||
style = CSSStyleDeclaration(attrib['style'])
|
||||
css = attrib['style'].strip()
|
||||
if css.startswith(';'):
|
||||
css = css[1:]
|
||||
style = CSSStyleDeclaration(css)
|
||||
self._style.update(self._stylizer.flatten_style(style))
|
||||
|
||||
def _has_parent(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue