Closed christianhans closed 7 years ago
This behavior is a poor result of the auto-quoting system. You can disable it by adding "auto_quote": false
to your User settings, which is probably what you want for a document in which everything is already quoted.
Per RFC 4081 section 2.7, the "" in row 2 column 1 is treated as an escaped double quote. When justifying the document, it then decides that the escaped double quote needs to be quoted itself, per section 2.5. This leads to the odd sequence """" which is literally a CSV field containing one double-quote character.
However, reading the BNF notation in the spec more carefully, it's clear that ""=escaped-double-quote is only true when already inside quotes. So, I'm going to tighten up the parser which should improve behavior in the common case of an empty quoted field.
Fixed in 1.1.5, thanks for these reports @christianhans. It's really helpful to have specific and easily-reproducible test cases to fix!
Just tested 1.1.5 - the new behavior is perfect. This plugin really became indispensable for my daily workflow - keep up the great work!
That's great to hear, thanks for the feedback!
Hi,
Using this CSV file:
Then performing "CSV: Justify columns" results in this CSV file:
I.e. the two quotes for the empty field in line 2 are doubled. Same happens with Compact columns.
Best regards Christian