Skip to content

Commit 17198c8

Browse files
committed
Merge pull request #145 from asottile/remove_json_workaround
Remove json workaround (fixed upstream at some point)
2 parents eb529c5 + d208076 commit 17198c8

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

sass.py

-29
Original file line numberDiff line numberDiff line change
@@ -610,35 +610,6 @@ def my_importer(path):
610610
v = v.decode('utf-8')
611611
if source_map_filename:
612612
source_map = source_map.decode('utf-8')
613-
if os.sep != '/' and os.altsep:
614-
# Libsass has a bug that produces invalid JSON string
615-
# literals which contain unescaped backslashes for
616-
# "sources" paths on Windows e.g.:
617-
#
618-
# {
619-
# "version": 3,
620-
# "file": "",
621-
# "sources": ["c:\temp\tmpj2ac07\test\b.scss"],
622-
# "names": [],
623-
# "mappings": "AAAA,EAAE;EAEE,WAAW"
624-
# }
625-
#
626-
# To workaround this bug without changing libsass'
627-
# internal behavior, we replace these backslashes with
628-
# slashes e.g.:
629-
#
630-
# {
631-
# "version": 3,
632-
# "file": "",
633-
# "sources": ["c:/temp/tmpj2ac07/test/b.scss"],
634-
# "names": [],
635-
# "mappings": "AAAA,EAAE;EAEE,WAAW"
636-
# }
637-
source_map = re.sub(
638-
r'"sources":\s*\[\s*"[^"]*"(?:\s*,\s*"[^"]*")*\s*\]',
639-
lambda m: m.group(0).replace(os.sep, os.altsep),
640-
source_map
641-
)
642613
v = v, source_map
643614
return v
644615
elif 'dirname' in modes:

0 commit comments

Comments
 (0)