1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

fix(dynamic string): ironvar parser being too greedy

This commit is contained in:
Jake Stanger 2024-01-25 22:21:41 +00:00
parent bfec31254f
commit 4d9d78f4ca
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -155,7 +155,7 @@ fn parse_variable(chars: &[char]) -> (DynamicStringSegment, usize) {
let str = chars
.iter()
.skip(1)
.take_while(|&c| !c.is_whitespace())
.take_while(|&c| c.is_ascii_alphanumeric() || c == &'_' || c == &'-')
.collect::<String>();
let len = str.chars().count() + SKIP_HASH;