From 466a68ce0278105828d41c36d2341e18aed89348 Mon Sep 17 00:00:00 2001 From: "Eevee (Lexy Munroe)" Date: Wed, 8 Jun 2016 16:56:56 -0700 Subject: Avoid stripping inline comments that are part of URLs. Fixes #350 --- scss/cssdefs.py | 2 ++ scss/source.py | 6 +++++- scss/tests/files/bugs/base64url.css | 3 +++ scss/tests/files/bugs/base64url.scss | 5 +++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 scss/tests/files/bugs/base64url.css create mode 100644 scss/tests/files/bugs/base64url.scss diff --git a/scss/cssdefs.py b/scss/cssdefs.py index 46b6877..5d9b7eb 100644 --- a/scss/cssdefs.py +++ b/scss/cssdefs.py @@ -480,6 +480,8 @@ _collapse_properties_space_re = re.compile(r'([:#])\s*{') _variable_re = re.compile('^\\$[-a-zA-Z0-9_]+$') _strings_re = re.compile(r'([\'"]).*?\1') +# TODO i know, this is clumsy and won't always work; it's better than nothing +_urls_re = re.compile(r'url[(].*?[)]') _has_placeholder_re = re.compile(r'(?