Skip to content

Commit

Permalink
fix: Revert breaking change on new line (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored Jun 13, 2024
1 parent 9e846fa commit f0584e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ jobs:
shell: bash
env:
ACTUAL: ${{ steps.convert.outputs.text }}
EXPECTED: '*Heading 1*\n\n*Heading 2*\n\n<http://example.com|Link>\n\n• List Item 1\n• List Item 2\n'
EXPECTED: |
*Heading 1*
*Heading 2*
<http://example.com|Link>
• List Item 1
• List Item 2
run: |
if [ "$ACTUAL" != "$EXPECTED" ]; then
echo "Actual: '$ACTUAL'"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f0584e4

Please sign in to comment.