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: correctly escapes double quotes when converting ux.table to csv #977

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

julesbonnard
Copy link
Contributor

modify replace with replaceAll as mentioned in this issue : #944 (comment)

modify replace with replaceAll as mentioned in this issue : oclif#944 (comment)
Copy link

Thanks for the contribution! Before we can merge this, we need @julesbonnard to sign the Salesforce Inc. Contributor License Agreement.

Copy link
Contributor

@mdonnalley mdonnalley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change looks good but can you add a test case here: https://github.com/oclif/core/blob/main/test/cli-ux/styled/table.test.ts#L150

Thanks!

@julesbonnard
Copy link
Contributor Author

Thanks for your review, I've just added a new test case.

I have one more question for the future: should the check for escaping quotes be done line by line (as it is now) or value by value? The latter would produce slightly cleaner CSVs, but at some performance cost.

@mdonnalley mdonnalley changed the base branch from main to mdonnalley/977 March 1, 2024 16:49
@mdonnalley mdonnalley merged commit a1c3e83 into oclif:mdonnalley/977 Mar 1, 2024
1 check passed
mdonnalley added a commit that referenced this pull request Mar 1, 2024
…977) (#980)

* Fix: correctly escapes double quotes when converting ux.table to csv

modify replace with replaceAll as mentioned in this issue : #944 (comment)

* test: complete ux.table test to check if double quotes escaping is correct

Co-authored-by: Jules Bonnard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants