More edge case work

This commit is contained in:
2025-03-07 21:02:26 -05:00
parent 972e2ceefa
commit 67977f96eb
9 changed files with 113 additions and 68 deletions

View File

@@ -357,7 +357,11 @@ pub fn clean_string(s: impl ToString) -> String {
(s.starts_with('\'') && s.ends_with('\'')) ||
(s.starts_with('`') && s.ends_with('`'))
{
s[1..s.len() - 1].to_string()
if s.len() > 1 {
s[1..s.len() - 1].to_string()
} else {
s
}
} else if s.starts_with("$(") && s.ends_with(')') {
s[2..s.len() - 1].to_string()
} else {