tangled
alpha
login
or
join now
tholps.site
/
skidmark
0
fork
atom
Tholp's bespoke website generator
0
fork
atom
overview
issues
pulls
pipelines
Allow passing empty string as an argument
tholps.site
1 month ago
91eca0d2
742b803d
+10
-1
2 changed files
expand all
collapse all
unified
split
Cargo.toml
src
stringtools.rs
+1
-1
Cargo.toml
···
1
1
[package]
2
2
name = "skidmark"
3
3
-
version = "2025.11.14"
3
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
48
+
// either fucked or empty string
49
49
+
if !quoted && arg.len() == 0 {
50
50
+
args.push("".into());
51
51
+
}
52
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
258
+
if tokens.len() == 0 {
259
259
+
return tokens;
260
260
+
}
261
261
+
253
262
let mut start: usize = 0;
254
263
let mut end: usize = tokens.len();
255
264
for tok in tokens {