interchangeable underscore/hyphen in builtin functions
This commit is contained in:
parent
409fa3a1dd
commit
7181077163
@ -451,7 +451,7 @@ impl Value {
|
|||||||
span,
|
span,
|
||||||
}) {
|
}) {
|
||||||
Ok(f) => f,
|
Ok(f) => f,
|
||||||
Err(_) => match GLOBAL_FUNCTIONS.get(&s) {
|
Err(_) => match GLOBAL_FUNCTIONS.get(&s.replace('_', "-")) {
|
||||||
Some(f) => {
|
Some(f) => {
|
||||||
return Ok(IntermediateValue::Value(Spanned {
|
return Ok(IntermediateValue::Value(Spanned {
|
||||||
node: f.0(
|
node: f.0(
|
||||||
|
@ -517,11 +517,6 @@ test!(
|
|||||||
"a {\n color: ie-hex-str(rgba(0, 255, 0, 0.5));\n}\n",
|
"a {\n color: ie-hex-str(rgba(0, 255, 0, 0.5));\n}\n",
|
||||||
"a {\n color: #8000FF00;\n}\n"
|
"a {\n color: #8000FF00;\n}\n"
|
||||||
);
|
);
|
||||||
// test!(
|
|
||||||
// builtin_functions_interchangable_underscore_hyphen,
|
|
||||||
// "a {\n color: ie_hex-str(rgba(0, 255, 0, 0.5));\n}\n",
|
|
||||||
// "a {\n color: #8000FF00;\n}\n"
|
|
||||||
// );
|
|
||||||
test!(
|
test!(
|
||||||
rgba_1_arg,
|
rgba_1_arg,
|
||||||
"a {\n color: rgba(74.7% 173 93%);\n}\n",
|
"a {\n color: rgba(74.7% 173 93%);\n}\n",
|
||||||
|
@ -111,3 +111,8 @@ test!(
|
|||||||
"a {\n color: foo;\n};",
|
"a {\n color: foo;\n};",
|
||||||
"a {\n color: foo;\n}\n"
|
"a {\n color: foo;\n}\n"
|
||||||
);
|
);
|
||||||
|
test!(
|
||||||
|
builtin_functions_interchangeable_underscore_hyphen,
|
||||||
|
"a {\n color: ie_hex-str(rgba(0, 255, 0, 0.5));\n}\n",
|
||||||
|
"a {\n color: #8000FF00;\n}\n"
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user