labels maybe idk they still seem kinda broken

This commit is contained in:
abbie 2022-06-15 19:13:36 +01:00
parent af24f554de
commit 44d508a15a
No known key found for this signature in database
GPG key ID: 04DDE463F9200F87

View file

@ -26,7 +26,8 @@ pub fn detect_labels(mut chunks: Vec<String>) -> (Vec<String>, Vec<Label>) {
let mut labels: Vec<Label> = vec![]; let mut labels: Vec<Label> = vec![];
for (index, element) in chunks.iter().enumerate() { for (index, element) in chunks.iter().enumerate() {
if element.chars().next() == Some(';') { if element.chars().next() == Some(';') {
let label = Label { label: element.replace(";","").to_string(), index: index }; println!("{}", index);
let label = Label { label: element.replace(";","").to_string(), index: index*4 };
labels.push(label); labels.push(label);
} else { } else {
stripped_chunks.push(element.to_string()); stripped_chunks.push(element.to_string());