mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:03:36 +02:00
Make parsing of CSS a little more robust.
This commit is contained in:
parent
d0a847d9fa
commit
bf658c1959
1 changed files with 1 additions and 1 deletions
|
|
@ -1038,7 +1038,7 @@ def get(what):
|
|||
src = [None for i in range(4)]
|
||||
if tag_css.has_key(what):
|
||||
msrc = tag_css[what].split()
|
||||
for i in range(len(msrc)):
|
||||
for i in range(min(len(msrc), len(src))):
|
||||
src[i] = msrc[i]
|
||||
for i, c in enumerate(('-top', '-right', '-bottom', '-left')):
|
||||
if tag_css.has_key(what+c):
|
||||
|
|
|
|||
Loading…
Reference in a new issue