From 5c8345d387607408409537eb4869ffa0640ba64c Mon Sep 17 00:00:00 2001 From: "Eevee (Alex Munroe)" Date: Wed, 10 Dec 2014 15:32:48 -0800 Subject: Avoid u'' for 3.2's sake. --- scss/rule.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scss/rule.py b/scss/rule.py index b8bf8c9..32dd74a 100644 --- a/scss/rule.py +++ b/scss/rule.py @@ -1,5 +1,6 @@ from __future__ import absolute_import from __future__ import print_function +from __future__ import unicode_literals import logging import re @@ -77,6 +78,8 @@ class SassRule(object): self.descendants = 0 def __repr__(self): + # TODO probably want to encode this with string_escape on python 2, and + # similar elsewhere, especially since this file has unicode_literals return "" % ( self.ancestry, len(self.properties), @@ -245,7 +248,7 @@ class BlockHeader(object): # e.g. identifiers aren't supposed to begin with three hyphens. # But we don't care, and will just spit it back out anyway. m = re.match( - u'@(else if|[-_a-zA-Z0-9\U00000080-\U0010FFFF]*)\\b', + '@(else if|[-_a-zA-Z0-9\U00000080-\U0010FFFF]*)\\b', prop, re.I) directive = m.group(0).lower() argument = prop[len(directive):].strip() -- cgit v1.2.1