Skip to content

Commit

Permalink
Workaround for narrow Python build
Browse files Browse the repository at this point in the history
  • Loading branch information
dexbol committed Mar 23, 2015
1 parent 03ed722 commit a297f91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scss/cssdefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,11 @@ def determine_encoding(buf):

def _unescape_one(match):
if match.group(1) is not None:
return six.unichr(int(match.group(1), 16))
try:
return six.unichr(int(match.group(1), 16))
except ValueError:
return (r'\U%08x' % int(match.group(1), 16)).decode(
'unicode-escape')
elif match.group(2) is not None:
return match.group(2)
else:
Expand Down

0 comments on commit a297f91

Please sign in to comment.