AlaSQL / alasql

AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.
http://alasql.org
MIT License
7.01k stars 650 forks source link

utils.uncomment not removing "line" comments #1796

Closed mathiasrw closed 9 months ago

mathiasrw commented 11 months ago

alasql.utils.uncomment is meant to remove -- something comments, but is not.

Expected to work:

res = alasql.utils.uncomment('a -- wow\nb');
// res == 'a \nb'

Please update test 221 to show its working by removing the .skip in the first test.


Spawn from the work with https://github.com/AlaSQL/alasql/issues/1795

vishal6557 commented 11 months ago

Can I please work on this?

mathiasrw commented 11 months ago

Yes, please.

I propose you also add a few more tests for the functionality so we know if we are breaking things while fixing.

mathiasrw commented 9 months ago

Fix released as part of v4.2.3