From e8160a6f33d5a4b36b3ad656628f13634302b3d7 Mon Sep 17 00:00:00 2001 From: Olivers Vitins Date: Sun, 19 May 2024 02:49:18 +0300 Subject: [PATCH] feat(commands): trim body, footer (#24) --- src/commands/commit.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/commands/commit.ts b/src/commands/commit.ts index 89baa14..1cfa30c 100644 --- a/src/commands/commit.ts +++ b/src/commands/commit.ts @@ -269,15 +269,17 @@ const command = new Command("commit") // Stop clack input process.stdin.pause(); - body = await getEditorInput( - `e.g. + body = ( + await getEditorInput( + `e.g. * Revert "Guard against SMTP smuggling", commit faf23f1, by restoring the setting to its default. * Revert "[security] SMTP smuggling: update short term fix (#2346)", commmit e931e10, by restoring the setting to its default. * Set smtpd_forbid_bare_newline=normalize. Fixes #444 `, - ); + ) + ).trim(); // Resume clack input process.stdin.resume(); @@ -296,11 +298,13 @@ Fixes #444 if (writeFooter) { process.stdin.pause(); - footer = await getEditorInput( - `e.g. + footer = ( + await getEditorInput( + `e.g. Co-authored-by: @john `, - ); + ) + ).trim(); process.stdin.resume(); }