diff --git a/src/builtin/list.rs b/src/builtin/list.rs index 192dc59..6d3f004 100644 --- a/src/builtin/list.rs +++ b/src/builtin/list.rs @@ -221,6 +221,7 @@ pub(crate) fn register(f: &mut HashMap) { max_args!(args, 2); let list = match arg!(args, 0, "list") { Value::List(v, ..) => v, + Value::Map(m) => m.entries(), v => vec![v], }; let value = arg!(args, 1, "value"); diff --git a/tests/list.rs b/tests/list.rs index 4f28b28..56ca1a9 100644 --- a/tests/list.rs +++ b/tests/list.rs @@ -288,8 +288,8 @@ test!( "a {\n color: index(1px solid red, dashed);\n}\n", "" ); -// test!( -// index_found_map, -// "a {\n color: index((width: 10px, height: 20px), (height 20px));\n}\n", -// "a {\n color: 2;\n}\n" -// ); +test!( + index_found_map, + "a {\n color: index((width: 10px, height: 20px), (height 20px));\n}\n", + "a {\n color: 2;\n}\n" +);