Skip to content

Commit

Permalink
Merge pull request integrations#22 from devrelm/patch-1
Browse files Browse the repository at this point in the history
[Fixes integrations#21] - Add newline before & after headers
  • Loading branch information
bkeepers committed Jun 15, 2018
2 parents a7d11ff + 3ed2b8d commit fd75659
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
// Slack doesn't support headings, so we'll just make them all bold
heading: {
filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
replacement: content => `*${content}*`
replacement: content => `\n*${content}*\n`
},

taskListItems: {
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/consecutive-headers.mrkdwn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h1>Header 1</h1><h2>Header 2</h1>
====
*Header 1*
*Header 2*

0 comments on commit fd75659

Please sign in to comment.