-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new stripquoted keyword arg and fix stripwhitespace (#112)
* Add new stripquoted keyword arg and fix stripwhitespace Fixes #109. As noted in that issue, stripping whitespace *within* quoted strings, IMO, should be considered a bug, since one of the primary reasons for quoting strings in various applications is to delineate the exact characters that make up the string. This PR fixes `stripwhitespace` to preserve whitepace encountered within strings, and only strip whitespace for non-quoted strings (leading or trailing) and leading/trailing around quoted fields. On the other hand, there are legitimate use-cases for also stripping whitespace within quoted strings, so we add a new opt-in `stripquoted` keyword argument that allows the additional precision of also stripping whitespace inside quotes. Note that passing `stripquoted=true` implies `stripwhitespace=true`, so it can be considered a "stronger" version of `stripewhitespace`. * Update src/Parsers.jl Co-authored-by: Nick Robinson <npr251@gmail.com> * Update test/runtests.jl Co-authored-by: Nick Robinson <npr251@gmail.com> Co-authored-by: Nick Robinson <npr251@gmail.com>
- Loading branch information
1 parent
227ffa1
commit ea1259a
Showing
3 changed files
with
46 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters