(char: string)
| 677 | // A backslash before a letter or digit is Go regexp syntax (`\d`), and Go |
| 678 | // rejects one before a non-ASCII character, so neither is an escaped literal. |
| 679 | const escapeError = (char: string): string | undefined => |
| 680 | isAsciiAlphanumeric(char) |
| 681 | ? `"\\${char}" is regular expression syntax in Docker, not an escaped "${char}"; ` + |
| 682 | `write "${char}" without the backslash to match it literally` |
| 683 | : codePoint(char) >= 0x80 |
| 684 | ? `"\\${char}" is not a valid escape in Docker; write "${char}" without the backslash to match it literally` |
| 685 | : undefined |
| 686 | |
| 687 | type Parsed<A> = { readonly value: A; readonly end: number } | string |
| 688 |
no test coverage detected