Don't unicode css

This commit is contained in:
Ruud
2013-05-10 18:06:10 +02:00
parent c1d35e8a57
commit a11cad619d
+3 -5
View File
@@ -13,10 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from rules import prefixRegex, rules as tr_rules
import cssutils
import re
from rules import rules as tr_rules
from rules import prefixRegex
keyframesRegex = re.compile(r'@keyframes\s?\w+\s?{(.*)}')
@@ -83,12 +82,11 @@ def magic(ruleset, debug, minify, filt, parser):
if not cssText: # blank rules return None so return an empty string
return
if minify or not hasattr(ruleset, 'style'):
return unicode(cssText)
return unicode(cssText) + '\n'
return cssText
return cssText + '\n'
def process(string, debug = False, minify = False, filt = ['webkit', 'moz', 'o', 'ms'], **prefs):
loglevel = 'DEBUG' if debug else 'ERROR'
parser = cssutils.CSSParser(loglevel = 'CRITICAL')
if minify:
cssutils.ser.prefs.useMinified()