Fix #474 (Fixing an exception if the CSS contains "@media all;")

This commit is contained in:
Kovid Goyal 2016-01-04 08:46:05 +05:30
parent 5e8402c5ef
commit 8fce6f04ef

View File

@ -334,7 +334,7 @@ def handle_media_queries(raw):
return '@media screen {' return '@media screen {'
return m.group() return m.group()
return re.sub(r'@media\s[^{]*{', replace, raw) return re.sub(r'@media\s[^{;]*?[{;]', replace, raw)
def expand_mobi8_markup(mobi8_reader, resource_map, log): def expand_mobi8_markup(mobi8_reader, resource_map, log):
# First update all internal links that are based on offsets # First update all internal links that are based on offsets