You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/thales/.nodenv/versions/11.9.0/lib/node_modules/pxi/node_modules/pxi-dsv/src/serializers/dsv.js:59
const regexpQuote = new RegExp(_quote, 'g')
^
SyntaxError: Invalid regular expression: /\/: \ at end of pattern
at new RegExp (<anonymous>)
at argv (/Users/thales/.nodenv/versions/11.9.0/lib/node_modules/pxi/node_modules/pxi-dsv/src/serializers/dsv.js:59:25)
at func (/Users/thales/.nodenv/versions/11.9.0/lib/node_modules/pxi/node_modules/pxi-dsv/src/serializers/csv.js:23:7)
at Object.initFunctions (/Users/thales/.nodenv/versions/11.9.0/lib/node_modules/pxi/src/api.js:36:96)
at Object.<anonymous> (/Users/thales/.nodenv/versions/11.9.0/lib/node_modules/pxi/index.js:19:27)
at Module._compile (internal/modules/cjs/loader.js:734:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
at Module.load (internal/modules/cjs/loader.js:626:32)
at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
at Function.Module._load (internal/modules/cjs/loader.js:558:3)
Expected behavior
Either make it work with a backspace character or treat the exception to make it more user-friendly, like "Unfortunately \ is not supported as quoting character".
I actually found this bug by mistake, as I misplaced the escape for the quote parameter.
The text was updated successfully, but these errors were encountered:
nice catch! Thanks to your detailed description, this should be an easy fix. I am currently looking into either removing the regular expression altogether or coming up with a better error, as you suggested.
I fixed the issue in pxi-dsv version 0.9.2 that was included in pxi version 0.36.10.
The fix was replacing the regular expression by while-looping over indexOf(quote). The backslash was also added to the quote and escape arbitraries in the tests.
The command you reported and similar commands should work from pxi --version 0.36.10 going forward.
I close the issue for now. Should the issue or a similar issue persist, I will reopen it.
Describe the bug
An exception is thrown when you try to use '' as quote character.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Either make it work with a backspace character or treat the exception to make it more user-friendly, like "Unfortunately \ is not supported as quoting character".
I actually found this bug by mistake, as I misplaced the
escape
for thequote
parameter.The text was updated successfully, but these errors were encountered: