Skip to content

Commit

Permalink
fix error being stray_quote rather than line_break
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeni Tennison committed Oct 3, 2015
1 parent fad464d commit 9bc2e2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/csvlint/validate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def build_exception_messages(csvException, errChars, lineNo)
#TODO 1 - this is a change in logic, rather than straight refactor of previous error building, however original logic is bonkers
#TODO 2 - using .kind_of? is a very ugly fix here and it meant to work around instances where :auto symbol is preserved in @csv_options
type = fetch_error(csvException)
if !@csv_options[:row_sep].kind_of?(Symbol) && type == :unclosed_quote && !@input.match(@csv_options[:row_sep])
if !@csv_options[:row_sep].kind_of?(Symbol) && [:unclosed_quote,:stray_quote].include?(type) && !@input.match(@csv_options[:row_sep])
build_linebreak_error
else
build_errors(type, :structure, lineNo, nil, errChars)
Expand Down

0 comments on commit 9bc2e2a

Please sign in to comment.