File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1396,7 +1396,8 @@ namespace Sass {
1396
1396
Token str (lexed);
1397
1397
--str.end ;
1398
1398
--position;
1399
- String_Constant* str_node = new (ctx.mem ) String_Constant (pstate, str);
1399
+
1400
+ String_Constant* str_node = new (ctx.mem ) String_Constant (pstate, str.time_wspace ());
1400
1401
// str_node->is_delayed(true);
1401
1402
return str_node;
1402
1403
}
Original file line number Diff line number Diff line change @@ -89,6 +89,11 @@ namespace Sass {
89
89
size_t length () const { return end - begin; }
90
90
string ws_before () const { return string (prefix, begin); }
91
91
string to_string () const { return string (begin, end); }
92
+ string time_wspace () const {
93
+ string str (to_string ());
94
+ string whitespaces (" \t\f\v\n\r " );
95
+ return str.erase (str.find_last_not_of (whitespaces)+1 );
96
+ }
92
97
93
98
operator bool () { return begin && end && begin >= end; }
94
99
operator string () { return to_string (); }
Original file line number Diff line number Diff line change @@ -710,7 +710,10 @@ namespace Sass {
710
710
}
711
711
712
712
const char * static_value (const char * src) {
713
- return sequence< static_component,
713
+ return sequence< sequence<
714
+ static_component,
715
+ zero_plus< identifier >
716
+ >,
714
717
zero_plus < sequence<
715
718
alternatives<
716
719
sequence< optional_spaces, alternatives<
@@ -722,6 +725,7 @@ namespace Sass {
722
725
>,
723
726
static_component
724
727
> >,
728
+ optional_css_whitespace,
725
729
alternatives< exactly<' ;' >, exactly<' }' > >
726
730
>(src);
727
731
}
You can’t perform that action at this time.
0 commit comments