sql-highlight
sql-highlight copied to clipboard
fix: improve operator detection and fix unknown segment
This fixes the "special" segments to include some missing multi-character operators from https://www.w3schools.com/sql/sql_operators.asp and other sites.
It also expands the "special" segment to match any single character that doesn't match any of the other regexps. That's nice because it gets rid of the need for the "unknown" segment, avoiding the problem listed in #178.
This PR contains two commits that can be merged individually.
Fixes #150, #178, refs #148.
Note that the ci error below seems unrelated to this PR, I don't know anything about @semantic-release/changelog.
Run npm ci
npm ERR! Cannot read property '@semantic-release/changelog' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/202[4](https://github.com/scriptcoded/sql-highlight/actions/runs/8584413208/job/23524645442?pr=193#step:4:5)-04-06T23_12_39_064Z-debug.log
This pull request has been marked as stale because it has been open for 14 days with no activity. Remove the stale label or comment or this will be closed in 5 days.
The PR is ready, the build error is an setup problem with github.
This pull request has been marked as stale because it has been open for 14 days with no activity. Remove the stale label or comment or this will be closed in 5 days.
The PR is ready, the build error is an setup problem with github.
This pull request has been marked as stale because it has been open for 14 days with no activity. Remove the stale label or comment or this will be closed in 5 days.
This pull request was closed because it has been stalled for 5 days with no activity.
Hi @wkeese. I'm so sorry for not touching on this and letting the bot harass you. The last few months during which I've neglected maintenance has left this project in a bit of a sorry state. I think the lack of maintenance combined with the unresolved braces CVE in the master branch caused a drop in usage, and now my try to clean up some workflows last week resulted in an accidental 5.0.0 release on NPM which cannot be recalled any longer.
This looks good, as it usually does with your code. I'll merge this into beta and ensure it's stable and aim to get a 5.1.0 release out ASAP, since the 5.0.0 isn't stable enough to be called a proper release.
As always, thank you.
Edit: I'll merge this regardless of the failing Node 14 test as it won't affect the beta branch which drops support for Node 14.
Turns out rebasing the PR fixed the tests as well.