From 5eaf58dda7153d86694c9907d64fbd7ca1c0de12 Mon Sep 17 00:00:00 2001 From: Caleb Denio Date: Fri, 3 Jul 2020 10:41:26 -0400 Subject: [PATCH] Add newline support in message --- package.json | 2 +- src/commands/ship.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 085e8d4..c55c230 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hackclub-ship", - "version": "0.0.3", + "version": "0.0.4", "description": "The best way for Hack Club members to ship their projects to Slack!", "private": false, "types": "build/types/types.d.ts", diff --git a/src/commands/ship.ts b/src/commands/ship.ts index d38709f..9ff9703 100644 --- a/src/commands/ship.ts +++ b/src/commands/ship.ts @@ -58,6 +58,8 @@ const command: GluegunCommand = { let { text, channels: selectedChannels } = await ask(questions) + text = text.replace(/\\n/g, '\n') + if (!(await confirm('Are you ready to ship?'))) { print.error('Aborting. :(') return