diff --git a/src/args.rs b/src/args.rs index eb59663..94cdb94 100644 --- a/src/args.rs +++ b/src/args.rs @@ -5,7 +5,9 @@ use crate::common::Pos; use crate::error::SassResult; use crate::scope::Scope; use crate::selector::Selector; -use crate::utils::{devour_whitespace, devour_whitespace_or_comment, eat_ident}; +use crate::utils::{ + devour_whitespace, devour_whitespace_or_comment, eat_ident, read_until_closing_quote, +}; use crate::value::Value; use crate::Token; @@ -186,6 +188,10 @@ pub(crate) fn eat_call_args>( val.push(tok); val.extend(read_until_close_paren(toks)); } + '"' | '\'' => { + val.push(tok); + val.extend(read_until_closing_quote(toks, tok.kind)); + } _ => val.push(tok), } } diff --git a/tests/functions.rs b/tests/functions.rs index 810544b..65df5bb 100644 --- a/tests/functions.rs +++ b/tests/functions.rs @@ -73,3 +73,8 @@ test!( "@function foo($a) {\n @return $a;\n}\n\na {\n color: foo([a, b]);\n}\n", "a {\n color: [a, b];\n}\n" ); +test!( + eats_quoted_content, + "a {\n color: unquote(\"a, b, c, d\");\n}\n", + "a {\n color: a, b, c, d;\n}\n" +);