From f71df9142a323b7982074d205e4a457889007bea Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Wed, 28 Oct 2026 03:38:53 +0000 Subject: [PATCH] Join strings split for the old line limit Remove concatenation introduced solely to satisfy the former hard 120-character line limit. Oxfmt permits long literals beyond its soft width target, so these splits are no longer needed. Co-Authored-By: codex --- README.md | 5 +---- scripts/get-latest-platform-tests.mjs | 4 +--- test/api.js | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8553168..d7f0d7a 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,7 @@ console.log(htmlExample.mimeType.toString()); // "text/html" console.log(htmlExample.body); // Uint8Array(22) [ 60, 104, 49, 62, 72, 101, … ] const pngExample = parseDataURL( - "data:image/png;base64,iVBORw0KGgoAAA" + - "ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4" + - "//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU" + - "5ErkJggg==", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", ); console.log(pngExample.mimeType.toString()); // "image/png" console.log(pngExample.body); // Uint8Array(85) [ 137, 80, 78, 71, 13, 10, … ] diff --git a/scripts/get-latest-platform-tests.mjs b/scripts/get-latest-platform-tests.mjs index 09243b5..dbcee89 100644 --- a/scripts/get-latest-platform-tests.mjs +++ b/scripts/get-latest-platform-tests.mjs @@ -13,9 +13,7 @@ if (process.env.NO_UPDATE) { // 3. Copy the commit hash const commitHash = "2dc0ad4f330f0b5647d11b00ae7437b668cb8df3"; -const urlPrefix = - `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}` + - `/fetch/data-urls/resources/`; +const urlPrefix = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/fetch/data-urls/resources/`; const files = ["base64.json", "data-urls.json"]; diff --git a/test/api.js b/test/api.js index 71f79eb..cea92ee 100644 --- a/test/api.js +++ b/test/api.js @@ -51,10 +51,7 @@ describe("Smoke tests via README examples", () => { it("should parse img/png base64 as expected", () => { const pngExample = parseDataURL( - "data:image/png;base64,iVBORw0KGgoAAA" + - "ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4" + - "//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU" + - "5ErkJggg==", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", ); assert.equal(pngExample.mimeType.toString(), "image/png"); assert.equal(pngExample.body.constructor, Uint8Array);