test for multiline comments in subtraction
This commit is contained in:
parent
409ac80921
commit
99ae3ae30a
@ -8,7 +8,8 @@ use crate::error::SassResult;
|
||||
use crate::scope::Scope;
|
||||
use crate::selector::Selector;
|
||||
use crate::utils::{
|
||||
devour_whitespace, eat_ident, read_until_closing_curly_brace, read_until_open_curly_brace, devour_whitespace_or_comment
|
||||
devour_whitespace, devour_whitespace_or_comment, eat_ident, read_until_closing_curly_brace,
|
||||
read_until_open_curly_brace,
|
||||
};
|
||||
use crate::value::Value;
|
||||
use crate::{Stmt, Token};
|
||||
|
@ -52,8 +52,8 @@ pub(crate) fn devour_whitespace_or_comment<I: Iterator<Item = Token>>(
|
||||
'/' => read_until_newline(toks),
|
||||
_ => {
|
||||
toks.reset_view();
|
||||
return Ok(found_whitespace)
|
||||
},
|
||||
return Ok(found_whitespace);
|
||||
}
|
||||
};
|
||||
found_whitespace = true;
|
||||
continue;
|
||||
|
@ -204,3 +204,8 @@ test!(
|
||||
"a {\n plus-after-minus: 1 - + 2;\n}\n",
|
||||
"a {\n plus-after-minus: -1;\n}\n"
|
||||
);
|
||||
test!(
|
||||
multiline_comments_between_operands,
|
||||
"a {\n color: 1/**/-/**/1;\n}\n",
|
||||
"a {\n color: 0;\n}\n"
|
||||
);
|
||||
|
@ -17,10 +17,15 @@ test!(
|
||||
);
|
||||
test!(unary_pos_color, "a {\n color: +\"foo\";\n}\n");
|
||||
test!(
|
||||
unary_pos_number,
|
||||
unary_pos_number_unit,
|
||||
"a {\n color: +1px;\n}\n",
|
||||
"a {\n color: 1px;\n}\n"
|
||||
);
|
||||
test!(
|
||||
unary_pos_number,
|
||||
"a {\n color: +10;\n}\n",
|
||||
"a {\n color: 10;\n}\n"
|
||||
);
|
||||
test!(
|
||||
unary_pos_in_list,
|
||||
"a {\n color: bar,+ \"bar\" - foo;\n}\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user