CSV grammar : skip leading \n
and/or \r
which result from std::getline used with non-native line endings
The goal is to support LF, CR and CRLF on all platforms.
This commit is contained in:
parent
ad80c91657
commit
d9ab7fd25f
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ struct csv_line_grammar : qi::grammar<Iterator, csv_line(std::string const&), qi
|
|||
|
||||
line = column(_r1) % char_(_r1)
|
||||
;
|
||||
column = quoted | *(char_ - (lit(_r1) /*| eol*/))
|
||||
column = -omit[char_("\n\r")] >> quoted | *(char_ - (lit(_r1) /*| eol*/))
|
||||
;
|
||||
quoted = omit[char_("\"'")[_a = _1]] > text(_a) > -lit(_a)
|
||||
;
|
||||
|
|
Loading…
Add table
Reference in a new issue