Blob Blame History Raw
From 139e86e32506dbd8c301b1241f9b79aeed9cb696 Mon Sep 17 00:00:00 2001
From: Natalie Weizenbaum <nweiz@google.com>
Date: Wed, 4 Oct 2017 15:20:18 -0700
Subject: [PATCH] Fix custom property interpolation (#2384)

Interpolation that included the full property name (such as --#{foo})
was crashing the parser.

Closes #2383
---
 lib/sass/scss/rx.rb       | 2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/sass/scss/rx.rb b/lib/sass/scss/rx.rb
index 2c48a77f..16963d1e 100644
--- a/lib/sass/scss/rx.rb
+++ b/lib/sass/scss/rx.rb
@@ -127,7 +127,7 @@
       OPTIONAL = /!#{W}optional/i
       IDENT_START = /-|#{NMSTART}/
 
-      IDENT_HYPHEN_INTERP = /-(#\{)/
+      IDENT_HYPHEN_INTERP = /-+(#\{)/
       STRING1_NOINTERP = /\"((?:[^\n\r\f\\"#]|#(?!\{)|#{ESCAPE})*)\"/
       STRING2_NOINTERP = /\'((?:[^\n\r\f\\'#]|#(?!\{)|#{ESCAPE})*)\'/
       STRING_NOINTERP = /#{STRING1_NOINTERP}|#{STRING2_NOINTERP}/