From e406a4a3c1fc6a45f05459108653eab897530a9a Mon Sep 17 00:00:00 2001 From: Matthias Van Parijs Date: Wed, 13 Nov 2024 15:37:13 +0100 Subject: [PATCH] fix: Split only on first equal sign occurance --- .vscode/launch.json | 2 +- packages/stitcher/package.json | 2 +- packages/stitcher/src/parser/helpers.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index b3057fbc..5fc1ef81 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,7 +11,7 @@ "type": "bun", "request": "attach", "name": "Debug Stitcher", - "url": "ws://localhost:6499/sprs-stitcher", + "url": "ws://localhost:6500/sprs-stitcher", } ] } \ No newline at end of file diff --git a/packages/stitcher/package.json b/packages/stitcher/package.json index d94c6f7d..92baada0 100644 --- a/packages/stitcher/package.json +++ b/packages/stitcher/package.json @@ -3,7 +3,7 @@ "version": "1.1.0", "type": "module", "scripts": { - "dev": "bun --watch --inspect=ws://localhost:6499/sprs-stitcher ./runtime/local.ts", + "dev": "bun --watch --inspect=ws://localhost:6500/sprs-stitcher ./runtime/local.ts", "build": "bun build ./runtime/local.ts --target=bun --outdir=./dist", "test": "bun test", "lint": "tsc && eslint", diff --git a/packages/stitcher/src/parser/helpers.ts b/packages/stitcher/src/parser/helpers.ts index 93236e95..66d9de21 100644 --- a/packages/stitcher/src/parser/helpers.ts +++ b/packages/stitcher/src/parser/helpers.ts @@ -4,7 +4,7 @@ export function mapAttributes( ) { const items = splitByCommaWithPreservingQuotes(param); items.forEach((item) => { - const [key, value] = item.split("="); + const [key, value] = item.split(/=(.+)/); if (key === undefined || value === undefined) { return; }