AccelerationNet / cl-csv

A common lisp library providing easy csv reading and writing
Other
116 stars 22 forks source link

reading-quoted-or-escaped doesn't check for leading spaces (as opposed to reading-quoted) #40

Open Yehouda opened 4 years ago

Yehouda commented 4 years ago

The function reading-quoted-or-escaped, which was added by: https://github.com/AccelerationNet/cl-csv/commit/2101afae90232904d70c1e23c419b114cdc4c840

Doesn't check if there are characters before the quote like reading-quoted does. That causes the test data-with-whitespace-trim to not get an error when it expects it, in the "whitespace before quoted values is a parse error if we are not trimming " case.

As it is now it look to me like reading-quoted-or-escaped is doing the wrong thing, because the pre-quote space ends up in the quoted string.