Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix perspective-viewer filter dropdown for values with double quotes #1696

Merged
merged 1 commit into from
Jan 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix perspective-viewer filter dropdown for values with double quotes
  • Loading branch information
texodus committed Jan 6, 2022
commit dfb7b89c60625e8ded4b645e9bd59e5514a3983d
8 changes: 7 additions & 1 deletion rust/perspective-viewer/src/rust/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,13 @@ impl Session {

Ok(csv
.lines()
.map(|x| (if x.len() > 1 { &x[1..x.len() - 1] } else { x }).to_owned())
.map(|x| {
if x.len() > 1 {
str::replace(&x[1..x.len() - 1], "\"\"", "\"")
} else {
x.to_owned()
}
})
.skip(2)
.collect::<Vec<String>>())
}
Expand Down