allow whitespace between @content and its args

This commit is contained in:
Connor Skees 2020-08-21 19:27:44 -04:00
parent 4635f76fa5
commit feb75800c8
2 changed files with 16 additions and 0 deletions

View File

@ -213,6 +213,8 @@ impl<'a> Parser<'a> {
let mut entered_scope = false; let mut entered_scope = false;
self.whitespace_or_comment();
let call_args = if self.consume_char_if_exists('(') { let call_args = if self.consume_char_if_exists('(') {
self.parse_call_args()? self.parse_call_args()?
} else { } else {

View File

@ -538,6 +538,20 @@ test!(
}", }",
"a {\n color: red;\n}\n" "a {\n color: red;\n}\n"
); );
test!(
space_between_content_and_args,
"space-after-content {
@mixin mixin {
@content /**/ (value1, value2);
}
@include mixin using ($arg1, $arg2) {
arg1: $arg1;
arg2: $arg2;
}
}",
"space-after-content {\n arg1: value1;\n arg2: value2;\n}\n"
);
error!( error!(
mixin_in_function, mixin_in_function,
"@function foo() { "@function foo() {