allow whitespace after trailing comma in map
This commit is contained in:
parent
e7fc6815c1
commit
5dd14794c5
@ -1305,6 +1305,8 @@ impl<'a, 'b: 'a> IntermediateValueIterator<'a, 'b> {
|
|||||||
|
|
||||||
map.insert(key.node, val.node);
|
map.insert(key.node, val.node);
|
||||||
|
|
||||||
|
devour_whitespace(paren_toks);
|
||||||
|
|
||||||
if paren_toks.peek().is_none() {
|
if paren_toks.peek().is_none() {
|
||||||
return Ok(Spanned {
|
return Ok(Spanned {
|
||||||
node: Value::Map(map),
|
node: Value::Map(map),
|
||||||
|
@ -177,3 +177,8 @@ test!(
|
|||||||
"$foo: ((\"<\", \"%3c\"), );",
|
"$foo: ((\"<\", \"%3c\"), );",
|
||||||
""
|
""
|
||||||
);
|
);
|
||||||
|
test!(
|
||||||
|
map_with_whitespace_after_trailing_comma,
|
||||||
|
"$a: (foo: red, ); a {\n color: inspect($a);\n}\n",
|
||||||
|
"a {\n color: (foo: red);\n}\n"
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user