cinemascience / cinema_components

A JavaScript library for building Cinema viewers
Other
2 stars 5 forks source link

Ignore leading whitespace for regular expression that identifies FILE columns. #3

Closed cmbiwer closed 2 years ago

cmbiwer commented 6 years ago

One of the issues that frequently comes up for me while using Cinema Components is that users have leading and trailing whitespace all over their CSV files.

This PR makes it so leading whitespace is ignore when identifying FILE columns.

Right now, the substring FILE must start at the first position. This allows variants such as

x0,x1,    FILE
jonwoodring commented 6 years ago

One thing to note though, is that that file is non-compliant. I'd throw a visible warning if it comes across it, so the user can fix it up.

jonwoodring commented 6 years ago

Or, what I specifically mean is that the spaces should be literally interpreted and the column is actually " ...some number of spaces... FILE", according to the specification.

jonwoodring commented 6 years ago

@dhrogers