Skip to content

Commit

Permalink
Merge pull request #332 from dexbol/narrow-build
Browse files Browse the repository at this point in the history
Workaround for narrow Python build
  • Loading branch information
eevee committed Jun 9, 2016
2 parents 9ea9178 + a297f91 commit 74ff779
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 @@ -449,7 +449,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 74ff779

Please sign in to comment.