Skip to content

Conversation

@kojiromike
Copy link
Contributor

@kojiromike kojiromike commented Dec 2, 2020

Test for #102

A regular expression is often written with backslash escapes. This change introduces a test to check that the Csv helper does not strip backslashes from input strings.

A regular expression is often written with backslash escapes. This change introduces a test to check that the Csv helper does not strip backslashes from input strings.
transform = lambda s: self.cast(s.strip(self.strip))

splitter = shlex(value, posix=True)
splitter.escape = '' # Do not escape backslashes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henriquebastos I want to call your attention to this line -- it fixes the issue for me, but may introduce backwards incompatibilities. I'm not sure if you have other users relying on this behavior. I would be happy with just this change, but let me know if you want me to introduce it via a new optional command arg or other backwards compatible change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant