allow whitespace between mixin name and args
This commit is contained in:
parent
feb75800c8
commit
c44f20d377
@ -32,7 +32,8 @@ impl<'a> Parser<'a> {
|
||||
return Err(("Mixins may not be declared in control directives.", span).into());
|
||||
}
|
||||
|
||||
self.whitespace();
|
||||
self.whitespace_or_comment();
|
||||
|
||||
let args = match self.toks.next() {
|
||||
Some(Token { kind: '(', .. }) => self.parse_func_args()?,
|
||||
Some(Token { kind: '{', .. }) => FuncArgs::new(),
|
||||
|
@ -552,6 +552,17 @@ test!(
|
||||
}",
|
||||
"space-after-content {\n arg1: value1;\n arg2: value2;\n}\n"
|
||||
);
|
||||
test!(
|
||||
space_between_mixin_and_args,
|
||||
"@mixin foo /**/ () /**/ {
|
||||
color: red;
|
||||
}
|
||||
|
||||
a {
|
||||
@include foo;
|
||||
}",
|
||||
"a {\n color: red;\n}\n"
|
||||
);
|
||||
error!(
|
||||
mixin_in_function,
|
||||
"@function foo() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user