Fix escaped quotes in Text to Columns

This commit is contained in:
agammann
2026-10-09 22:47:38 -07:00
parent 13664fe66b
commit 06cb377c54
2 changed files with 34 additions and 2 deletions
+8 -2
View File
@@ -683,9 +683,15 @@ fn split_delimited(text: &str, delims: &[char], consecutive: bool, quote: char)
let mut cur = String::new();
let mut in_q = false;
let mut last_delim = false;
for c in text.chars() {
let mut chars = text.chars().peekable();
while let Some(c) = chars.next() {
if c == quote {
in_q = !in_q;
if in_q && chars.peek() == Some(&quote) {
cur.push(quote);
chars.next();
} else {
in_q = !in_q;
}
continue;
}
if !in_q && delims.contains(&c) {