reasonix 0.27.0 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +7 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -6720,7 +6720,7 @@ function splitOnChainOps(cmd) {
|
|
|
6720
6720
|
const ch = cmd[i];
|
|
6721
6721
|
if (quote2) {
|
|
6722
6722
|
if (ch === quote2) quote2 = null;
|
|
6723
|
-
else if (
|
|
6723
|
+
else if (quote2 === '"' && isDqEscape(ch, cmd[i + 1])) i++;
|
|
6724
6724
|
i++;
|
|
6725
6725
|
atTokenStart = false;
|
|
6726
6726
|
continue;
|
|
@@ -6792,7 +6792,7 @@ function parseSegment(segStr) {
|
|
|
6792
6792
|
if (quote2) {
|
|
6793
6793
|
if (ch === quote2) {
|
|
6794
6794
|
quote2 = null;
|
|
6795
|
-
} else if (
|
|
6795
|
+
} else if (quote2 === '"' && isDqEscape(ch, segStr[i + 1])) {
|
|
6796
6796
|
cur += segStr[++i] ?? "";
|
|
6797
6797
|
curHasContent = true;
|
|
6798
6798
|
} else {
|
|
@@ -7195,6 +7195,9 @@ var BUILTIN_ALLOWLIST = [
|
|
|
7195
7195
|
"ruff",
|
|
7196
7196
|
"mypy"
|
|
7197
7197
|
];
|
|
7198
|
+
function isDqEscape(prev, next) {
|
|
7199
|
+
return prev === "\\" && (next === '"' || next === "\\");
|
|
7200
|
+
}
|
|
7198
7201
|
function tokenizeCommand(cmd) {
|
|
7199
7202
|
const out = [];
|
|
7200
7203
|
let cur = "";
|
|
@@ -7204,7 +7207,7 @@ function tokenizeCommand(cmd) {
|
|
|
7204
7207
|
if (quote2) {
|
|
7205
7208
|
if (ch === quote2) {
|
|
7206
7209
|
quote2 = null;
|
|
7207
|
-
} else if (
|
|
7210
|
+
} else if (quote2 === '"' && isDqEscape(ch, cmd[i + 1])) {
|
|
7208
7211
|
cur += cmd[++i];
|
|
7209
7212
|
} else {
|
|
7210
7213
|
cur += ch;
|
|
@@ -7246,7 +7249,7 @@ function detectShellOperator(cmd) {
|
|
|
7246
7249
|
if (quote2) {
|
|
7247
7250
|
if (ch === quote2) {
|
|
7248
7251
|
quote2 = null;
|
|
7249
|
-
} else if (
|
|
7252
|
+
} else if (quote2 === '"' && isDqEscape(ch, cmd[i + 1])) {
|
|
7250
7253
|
cur += cmd[++i];
|
|
7251
7254
|
curQuoted = true;
|
|
7252
7255
|
} else {
|