Skip to content
Myr

export.patch

This file

Path

examples/datekit/layers/maintainers/known-bad/export.patch

19 lines · 718 bytes

Last changed by

Merge build/608-datekit-maintainers-layer: datekit has a maintainers layer of sealed checks, each citing the clause it enforces, and the seed pushes itoscabrielbefore adoption166f6c9

History of this file

Take it

Merge build/608-datekit-maintainers-layer: datekit has a maintainers layer of sealed checks, each citing the clause it enforces, and the seed pushes itoscabrielbefore adoption166f6c9

lines 1–19why, one step back
1export: unescape only the first pair of quotes in quoted text
23format prints 'it''s 7 o''clock' as it's 7 o''clock. Every public test4quotes one apostrophe at a time, so they all pass; admission needs a5held-back check in export to fail here.67diff --git a/src/format.ts b/src/format.ts8index 43d6a78..99fc98b 1006449--- a/src/format.ts10+++ b/src/format.ts11@@ -92,7 +92,7 @@ const show = (piece: string, parts: ZonedParts): string => {12 if (piece.startsWith("'")) {13 return piece === "''"14 ? "'"15- : piece.slice(1, piece.endsWith("'") ? -1 : undefined).replaceAll("''", "'");16+ : piece.slice(1, piece.endsWith("'") ? -1 : undefined).replace("''", "'");17 }18 19 if (!/^[A-Za-z]/u.test(piece)) {