diff --git a/myvc-push.js b/myvc-push.js index 98205e7..ca61a41 100644 --- a/myvc-push.js +++ b/myvc-push.js @@ -469,6 +469,7 @@ class Push { continue; } + let delimiterFound = false; while (i < sql.length) { char = sql[i]; @@ -480,7 +481,8 @@ class Push { i++; } } else { - if (begins(delimiter)) break; + delimiterFound = begins(delimiter); + if (delimiterFound) break; const tok = tokenIndex.get(char); if (tok && begins(tok.start)) @@ -490,7 +492,8 @@ class Push { } } - const len = i - stmtStart; + let len = i - stmtStart; + if (delimiterFound) len -= delimiter.length; const stmt = sql.substr(stmtStart, len); if (!/^\s*$/.test(stmt)) diff --git a/package.json b/package.json index 2cd5672..7adcb5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "myvc", - "version": "1.3.12", + "version": "1.3.13", "author": "Verdnatura Levante SL", "description": "MySQL Version Control", "license": "GPL-3.0",