Comparing version 0.1.2 to 0.1.3
@@ -5,3 +5,5 @@ 'use strict'; | ||
unclosedMLC: 1, // Unclosed multi-line comment. | ||
unclosedText: 2 // Unclosed text block. | ||
unclosedText: 2, // Unclosed text block. | ||
unclosedQI: 3, // Unclosed quoted identifier. | ||
multiLineQI: 4 // Multi-line quoted identifier not supported. | ||
}; | ||
@@ -8,0 +10,0 @@ |
@@ -56,2 +56,17 @@ 'use strict'; | ||
if (s === '"') { | ||
var closeIdx = sql.indexOf('"', idx + 1); | ||
if (closeIdx < 0) { | ||
throwError(PEC.unclosedQI, "Unclosed quoted identifier."); | ||
} | ||
var text = sql.substr(idx, closeIdx - idx + 1); | ||
if (text.indexOf(EOL) > 0) { | ||
throwError(PEC.multiLineQI, "Multi-line quoted identifier not supported."); | ||
} | ||
addSpace(); | ||
result += text; | ||
idx = closeIdx; | ||
continue; | ||
} | ||
if (s === '\'') { | ||
@@ -58,0 +73,0 @@ var closeIdx = idx; |
{ | ||
"name": "pg-minify", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Minifies PostgreSQL scripts.", | ||
@@ -12,4 +12,3 @@ "main": "lib/index.js", | ||
"files": [ | ||
"lib", | ||
"test" | ||
"lib" | ||
], | ||
@@ -16,0 +15,0 @@ "homepage": "https://github.com/vitaly-t/pg-minify", |
@@ -24,2 +24,4 @@ pg-minify | ||
First, clone the repository and install DEV dependencies. | ||
``` | ||
@@ -26,0 +28,0 @@ $ npm test |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65
8853
5
191