fix: check for the color pattern against the end
This commit is contained in:
parent
6c9619d094
commit
a65dba181b
1 changed files with 2 additions and 1 deletions
|
@ -92,8 +92,9 @@ impl menu::Item for CompletionItem {
|
|||
value, ..
|
||||
}) => value,
|
||||
};
|
||||
Color::from_hex(text)
|
||||
text.get(text.len() - 7..)
|
||||
})
|
||||
.and_then(Color::from_hex)
|
||||
.map_or("color".into(), |color| {
|
||||
Spans::from(vec![
|
||||
Span::raw("color "),
|
||||
|
|
Loading…
Reference in a new issue