Skip to content

Commit

Permalink
Merge pull request #55 from RunOnFlux/development
Browse files Browse the repository at this point in the history
Fix for commented SQL directives
  • Loading branch information
alihm authored Dec 7, 2023
2 parents 15cefdb + ec91b18 commit 389b53c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sqlAnalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function removeFirstLine(str) {
* @param {string} sql sql query
*/
function cleanUP(sql) {
if (sql.startsWith('/*') && sql.endsWith('*/')) return false;
if (sql.startsWith('/*') && sql.endsWith('*/') && !sql.startsWith('/*!')) return false;
if (sql.startsWith('--')) {
// eslint-disable-next-line no-param-reassign
while (sql.startsWith('--') || sql.startsWith('\r\n') || sql.startsWith('\n')) sql = removeFirstLine(sql);
Expand Down

0 comments on commit 389b53c

Please sign in to comment.