Search code examples
bitbucketslack-commands

How to format a reply as a code snippet when responding to a bitbucket comment via slack?


I am trying to reply to a comment, on a PR, on bitbucket with a code snippet instead of plain text, from the associated slack channel.


Solution

  • It is quite straightforward. Put the code lines in between these(```). As StackOverflow is following the same thing, I have to apply some trick:

    Let ``` = AAA. Then,

    AAA

    This is your code. Place your code here.

    AAA

    This will be the output:

    This is your code. Place your code here.