mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
...
This commit is contained in:
parent
523185f7a9
commit
be17dd8e4b
@ -227,17 +227,13 @@ def rewrite_links(root, link_repl_func, resolve_base_href=False):
|
|||||||
text = el.attrib['style']
|
text = el.attrib['style']
|
||||||
if _css_url_re.search(text) is not None:
|
if _css_url_re.search(text) is not None:
|
||||||
stext = parseStyle(text)
|
stext = parseStyle(text)
|
||||||
changed = False
|
|
||||||
for p in stext.getProperties(all=True):
|
for p in stext.getProperties(all=True):
|
||||||
v = p.cssValue
|
v = p.cssValue
|
||||||
if v.CSS_VALUE_LIST == v.cssValueType:
|
if v.CSS_VALUE_LIST == v.cssValueType:
|
||||||
for item in v:
|
for item in v:
|
||||||
changed = True
|
|
||||||
set_property(item)
|
set_property(item)
|
||||||
elif v.CSS_PRIMITIVE_VALUE == v.cssValueType:
|
elif v.CSS_PRIMITIVE_VALUE == v.cssValueType:
|
||||||
changed = True
|
|
||||||
set_property(v)
|
set_property(v)
|
||||||
if changed:
|
|
||||||
el.attrib['style'] = stext.cssText.replace('\n', ' ').replace('\r',
|
el.attrib['style'] = stext.cssText.replace('\n', ' ').replace('\r',
|
||||||
' ')
|
' ')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user