Tholp's bespoke website generator

Allow passing empty string as an argument

+10 -1
+1 -1
Cargo.toml
··· 1 1 [package] 2 2 name = "skidmark" 3 - version = "2025.11.14" 3 + version = "2026.1.24" 4 4 edition = "2021" 5 5 repository = "https://github.com/Tholp1/Skidmark" # for cargo-dist, also available at https://tangled.org/@tholps.site/skidmark 6 6
+9
src/stringtools.rs
··· 45 45 46 46 if c == '\"' && !escaped { 47 47 quoted = !quoted; 48 + // either fucked or empty string 49 + if !quoted && arg.len() == 0 { 50 + args.push("".into()); 51 + } 52 + 48 53 continue; 49 54 } 50 55 ··· 250 255 251 256 //trim whitespace from the ends 252 257 pub fn trim_whitespace_tokens(tokens: &[Token]) -> &[Token] { 258 + if tokens.len() == 0 { 259 + return tokens; 260 + } 261 + 253 262 let mut start: usize = 0; 254 263 let mut end: usize = tokens.len(); 255 264 for tok in tokens {