From f0584e47baca90b34a36f88dbafa55dca3030381 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Thu, 13 Jun 2024 02:25:56 +0200 Subject: [PATCH] fix: Revert breaking change on new line (#16) --- .github/workflows/main.yml | 12 ++++++++++-- index.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa9fba6..9b3932d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,15 @@ jobs: shell: bash env: ACTUAL: ${{ steps.convert.outputs.text }} - EXPECTED: '*Heading 1*\n\n*Heading 2*\n\n\n\n• List Item 1\n• List Item 2\n' + EXPECTED: | + *Heading 1* + + *Heading 2* + + + + • List Item 1 + • List Item 2 run: | if [ "$ACTUAL" != "$EXPECTED" ]; then echo "Actual: '$ACTUAL'" @@ -55,7 +63,7 @@ jobs: id: release uses: cycjimmy/semantic-release-action@v2 with: - semantic_version: 19 + semantic_version: 19 extra_plugins: | @semantic-release/changelog @semantic-release/git diff --git a/index.js b/index.js index 5451722..182bb79 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ const slackifyMarkdown = require('slackify-markdown'); try { const input = core.getInput('text', { required: true }); const mrkdwn = slackifyMarkdown(input); - const output = mrkdwn.replace(/\r\n|\r|\n/g, "\\n"); + const output = mrkdwn.replace(/\r\n|\r|\n/g, "\n"); core.setOutput("text", output); } catch (error) { core.setFailed(error.message);