MCPcopy Create free account
hub / github.com/Effect-TS/effect / escapeError

Function escapeError

packages/effect/src/IgnoreFile.ts:679–685  ·  view source on GitHub ↗
(char: string)

Source from the content-addressed store, hash-verified

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.
679const 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
687type Parsed<A> = { readonly value: A; readonly end: number } | string
688

Callers 2

memberFunction · 0.85
compileDockerFunction · 0.85

Calls 2

isAsciiAlphanumericFunction · 0.85
codePointFunction · 0.85

Tested by

no test coverage detected