-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Respect escaped commas #78
Comments
Thanks for posting the suggestion. The plug-in does support escaping of quote characters by using double quote characters, see example data below
And any value that also contains the separator character (be it comma, semicolon etc.) can be escaped by adding quotes around the value as a whole, see the following example data:
As for using a slash for escaping certain characters, that is common for code like in C++/Java/Python etc. but afaik I haven't seen this being used in practice in csv data files. This would require quite some effort to include in the plugin, because both the lexer (syntax highlighting) and the parser/validator would have to be changed. So is this an actual use-case, is there a system or data-supplier that formats the data using a slash to escape commas? |
Sorry for the late reply 😄 Our decades old desktop software relies on that detail it seems, and it doesnt seem to cause problems programmatically We can close the issue if you, understandably, don't want to pick up on it |
Thanks for this tool btw. This is very good for csv analysis. I also have another use case where the exported csv from an application widely used by users does have
I am just replacing those as workaround for now. That works fine but would help to add this as part of this tool. Of course this depends on the effort that is required, leave it to you! |
Thanks for posting your feedback. I don't quite understand the first point though, about the single quote escaped like
The second point, if new lines are provided in the data as |
@AlmightyLks @awdhbit fyi if you only need the syntax highlighting then you could take a look at the Regex Trainer plugin. When you use the regular expression below, then it kind of works for the syntax highlighting for csv data with escaped commas.
|
Would love to see this plugin respect escaped quotes and doesn't falsely format them
At the same time, I've been messing with another use-case dealing with commas and whitelisting escaped commas. I've used the following regex, and it might be applicable here 😄
The text was updated successfully, but these errors were encountered: