-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support multiline fields with arbitrary separators #35
Comments
Hello @mechatroner, I've started looking into this issue and have two questions. 1 - As you've mentioned, we can enable arbitrary separators by removing this check: Line 464 in e2fa752
However, from what I could tell, the policy will usually be defaulted to Lines 459 to 463 in e2fa752
So unless the user takes explicit action to enable the quoted policy together with their non-standard separator (either by using the enable_quoted sublime-command, or through the configuration), the feature will still not appear to work as expected.
Does this analysis seem correct to you? If yes, can we consider removing this check as well (and therefore always defaulting 2 - I've seen that this same check on the standard separators Lines 61 to 62 in e2fa752
I'm not so familiar with python and couldn't easily determine the impact of leaving this check here while removing it from other locations. Would you be able to indicate whether this part of the code must be aligned as well in order to more cleanly resolve this issue? Thanks! |
Your analysis is correct! I think that is the only place where changes should be made.
I am not sure if this would be more intuitive, for example, tab-separated dialects are doublequote-agnostic in 100% of cases and I always thought that pipe-separated files also mostly use "simple" dialect (e.g. use case here: mechatroner/vscode_rainbow_csv#1 (comment) ). I admit that I don't have any statistics about pipe-separated file usage in different domains but I would prefer not to change the default behavior without strong supportive evidence. My impression was that choosing We can add another setting though - like a list of separators that should use "quoted" dialect by default, or even a boolean setting like "quote all separators by default" as you suggest and handle it the main.py. |
Hi @mechatroner, sorry for the late response.
Thanks for confirming this 👍
My use case was actually not about escaping
But if nobody else has complained, then you're right, there's no need to modify the behaviour for an edge case such as mine. I don't think there's a real need to add any new configuration options, since the existing commands (after this fix) can be used to make this work. Maybe all that's needed is to make sure that the documentation helps users to achieve this if they need? With this I'm all set to work on getting you a pull request, then :) Thanks for your feedback so far! |
Currently, multiline fields are only supported with commas and semicolons, see #20 for context.
The text was updated successfully, but these errors were encountered: