danger / danger-js

⚠️ Stop saying "you forgot to …" in code review
http://danger.systems/js/
MIT License
5.27k stars 368 forks source link

[BUG] Markdown is not working on bitbucket cloud #1131

Open EugeneDraitsev opened 3 years ago

EugeneDraitsev commented 3 years ago

Describe the bug

I have a super simple dangerfile.js

import { markdown } from "danger"

markdown('### TEST')

I expect to see h2 markdown in my danger comment in PR, bit I have this:

image

To Reproduce Steps to reproduce the behavior:

  1. Create dangerfile.js file as described above at bitbucket cloud repo
  2. See an issue with a markdown rendering

Expected behavior Markdown works fine

Screenshots Screenshot attached above. You also can have a look to PR

Your Environment

software version
danger.js 10.6.4
node 10.15.0
EugeneDraitsev commented 3 years ago

Oh, I figured a workaround for it

This dangerfile.js will generate 1 correct and 1 broken markdown message:

import { markdown } from "danger"

markdown('## this is not working')

markdown('\n## now it works')

image

So, the issue is that you need to add leading \n to all markdown strings for bitbucket cloud

orta commented 3 years ago

Good digging