From 55a1ca7e9d9679c878785b35be4b36e5c77ae2b9 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Wed, 3 Apr 2024 17:52:38 +0200 Subject: [PATCH] feat(cli): support CR in multiline input --- cli/_prompt_template.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/_prompt_template.ts b/cli/_prompt_template.ts index 23f4b61..433de1d 100644 --- a/cli/_prompt_template.ts +++ b/cli/_prompt_template.ts @@ -22,7 +22,7 @@ export async function promptProps< for await (const chunk of Deno.stdin.readable) { const text = decoder.decode(chunk) - if (text.startsWith('!EOF\n')) { + if ((/^!EOF\r?\n$/.test(text))) { break } //@ts-ignore TODO fix type inference