at-rules are case sensitive
This commit is contained in:
parent
1de8067e24
commit
6a13c6f320
@ -72,7 +72,7 @@ pub enum AtRuleKind {
|
|||||||
impl TryFrom<&Spanned<String>> for AtRuleKind {
|
impl TryFrom<&Spanned<String>> for AtRuleKind {
|
||||||
type Error = SassError;
|
type Error = SassError;
|
||||||
fn try_from(c: &Spanned<String>) -> Result<Self, SassError> {
|
fn try_from(c: &Spanned<String>) -> Result<Self, SassError> {
|
||||||
Ok(match c.node.to_ascii_lowercase().as_str() {
|
Ok(match c.node.as_str() {
|
||||||
"use" => Self::Use,
|
"use" => Self::Use,
|
||||||
"forward" => Self::Forward,
|
"forward" => Self::Forward,
|
||||||
"import" => Self::Import,
|
"import" => Self::Import,
|
||||||
|
@ -96,7 +96,7 @@ test!(
|
|||||||
test!(
|
test!(
|
||||||
uppercase_escaped_if,
|
uppercase_escaped_if,
|
||||||
"@\\49 f true {\n a {\n color: red;\n }\n}\n",
|
"@\\49 f true {\n a {\n color: red;\n }\n}\n",
|
||||||
"a {\n color: red;\n}\n"
|
"@If true {\n a {\n color: red;\n }\n}\n"
|
||||||
);
|
);
|
||||||
test!(
|
test!(
|
||||||
escaped_else,
|
escaped_else,
|
||||||
@ -108,6 +108,7 @@ test!(
|
|||||||
"@if false {}\n\n@\\45lse {\n a {\n color: red;\n }\n}\n",
|
"@if false {}\n\n@\\45lse {\n a {\n color: red;\n }\n}\n",
|
||||||
"a {\n color: red;\n}\n"
|
"a {\n color: red;\n}\n"
|
||||||
);
|
);
|
||||||
|
test!(uppercase_if, "@If true {\n a {\n color: red;\n }\n}\n");
|
||||||
error!(nothing_after_if, "@if", "Error: Expected expression.");
|
error!(nothing_after_if, "@if", "Error: Expected expression.");
|
||||||
error!(
|
error!(
|
||||||
nothing_after_dollar,
|
nothing_after_dollar,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user