From 5decefad7d417921bb0e55b444721b176a9e2b3e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 Mar 2013 14:38:38 +0530 Subject: [PATCH] Conversion: handle the :before and :after pseudo CSS selectors correctly --- src/calibre/ebooks/oeb/stylizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index 3fac8c43cc..d765b43c6a 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -319,7 +319,7 @@ class Stylizer(object): rules.sort() self.rules = rules self._styles = {} - pseudo_pat = re.compile(ur':(first-letter|first-line|link|hover|visited|active|focus)', re.I) + pseudo_pat = re.compile(ur':(first-letter|first-line|link|hover|visited|active|focus|before|after)', re.I) for _, _, cssdict, text, _ in rules: fl = pseudo_pat.search(text) if fl is not None: