Fix list spread syntax highlighting (#12793)

# Description
I broke syntax highlighting for list spreads in #12529. This should fix
#12792 😅. I just copied the code for highlighting record
spreads.
This commit is contained in:
Ian Manske
2024-05-07 05:41:47 +00:00
committed by GitHub
parent eccc558a4e
commit c54d223ea0
2 changed files with 18 additions and 7 deletions

View File

@ -3895,7 +3895,7 @@ pub fn parse_list_expression(
Type::List(elem_ty) => *elem_ty.clone(),
_ => Type::Any,
};
let span = Span::new(curr_span.start, spread_arg.span.end);
let span = Span::new(curr_span.start, curr_span.start + 3);
(ListItem::Spread(span, spread_arg), elem_ty)
} else {
let arg = parse_multispan_value(