From 1b4e2a88589609b1fe93509a130fbc7b5e9d8b86 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 Apr 2015 10:52:00 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/stylizer.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index 4bcb2c6d58..c0bdffc9b3 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -33,20 +33,21 @@ def html_css_stylesheet(): return _html_css_stylesheet -INHERITED = set(['azimuth', 'border-collapse', 'border-spacing', - 'caption-side', 'color', 'cursor', 'direction', 'elevation', - 'empty-cells', 'font-family', 'font-size', 'font-style', - 'font-variant', 'font-weight', 'letter-spacing', - 'line-height', 'list-style-image', 'list-style-position', - 'list-style-type', 'orphans', 'page-break-inside', - 'pitch-range', 'pitch', 'quotes', 'richness', 'speak-header', - 'speak-numeral', 'speak-punctuation', 'speak', 'speech-rate', - 'stress', 'text-align', 'text-indent', 'text-transform', - 'visibility', 'voice-family', 'volume', 'white-space', - 'widows', 'word-spacing', 'text-shadow']) +INHERITED = { + 'azimuth', 'border-collapse', 'border-spacing', 'caption-side', 'color', + 'cursor', 'direction', 'elevation', 'empty-cells', 'font-family', + 'font-size', 'font-style', 'font-variant', 'font-weight', 'letter-spacing', + 'line-height', 'list-style-image', 'list-style-position', + 'list-style-type', 'orphans', 'page-break-inside', 'pitch-range', 'pitch', + 'quotes', 'richness', 'speak-header', 'speak-numeral', 'speak-punctuation', + 'speak', 'speech-rate', 'stress', 'text-align', 'text-indent', + 'text-transform', 'visibility', 'voice-family', 'volume', 'white-space', + 'widows', 'word-spacing', 'text-shadow', +} -FONT_SIZE_NAMES = set(['xx-small', 'x-small', 'small', 'medium', 'large', - 'x-large', 'xx-large']) +FONT_SIZE_NAMES = { + 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large' +} class Stylizer(object): STYLESHEETS = WeakKeyDictionary()