Skip to content

Commit

Permalink
Merge pull request #570 from Caleb-Irwin/master
Browse files Browse the repository at this point in the history
Added missing single quote in error message
  • Loading branch information
dustinsmith1024 authored May 26, 2021
2 parents 9ba45c7 + e975cf6 commit 8c0dc09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/parse/__tests__/CsvParsingStream.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ describe('CsvParserStream', () => {
return new Promise((res, rej) => {
write(malformed);
const stream = parseFile(malformed.path, { headers: true });
expectErrorEvent(stream, "Parse Error: expected: ',' OR new line got: 'a'. at 'a \", Las", res, rej);
expectErrorEvent(stream, "Parse Error: expected: ',' OR new line got: 'a'. at 'a \", Las'", res, rej);
});
});

Expand Down
2 changes: 1 addition & 1 deletion packages/parse/src/parser/column/QuotedColumnParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class QuotedColumnParser {
// tldr: only part of the column was quoted
const linePreview = scanner.lineFromCursor.substr(0, 10).replace(/[\r\n]/g, "\\n'");
throw new Error(
`Parse Error: expected: '${parserOptions.escapedDelimiter}' OR new line got: '${nextNonSpaceToken.token}'. at '${linePreview}`,
`Parse Error: expected: '${parserOptions.escapedDelimiter}' OR new line got: '${nextNonSpaceToken.token}'. at '${linePreview}'`,
);
}
scanner.advanceToToken(nextNonSpaceToken);
Expand Down

0 comments on commit 8c0dc09

Please sign in to comment.