Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Code suggestions convert tab indentation to spaces on apply (BCLOUD-17360)

Ross Ingle-Finch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 14, 2026

Reproducing the issue Stefan Hirschenberger raised on 12/Aug/2025 on the now-closed BCLOUD-17360.

Summary

When a suggestion block contains tab-indented content, Bitbucket converts the tabs to 4 spaces when the suggestion is applied. The original file uses tabs. The result is a whitespace change that was never part of the intended suggestion.

Reproduction

Posted via REST API

```bash
curl -s -X POST \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  --data @payload.json \
  "https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/pullrequests/<id>/comments"
```

Payload `raw` field (tabs preserved as `\t`):

```json
{
  "content": {
    "raw": "```suggestion\n\tdepends on BOARD_VT_RT1160\n\tdepends on VT_RESET_INFO\n\tdefault y\n```"
  },
  "inline": {
    "path": "boards/arm/vt_rt1160/reboot/Kconfig",
    "start_to": 23,
    "to": 24
  }
}
```

A similar comment/Change was made via the GUI and produced the same result.

If the comment was fetched using the REST API then the tabs could be seen, however, visually, they were shown as spaces.

When Applied, they were applied as spaces. This was confirmed visually by changing the tab width on the pull request settings.

Of Note

When doing it manually, the tab is preserved until "Add comment now" is pushed, from then on, the tab is "lost". (Though if you pull that comment using the REST API the tab can be seen in the content.

1 answer

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2026

Hi @Ross Ingle-Finch 

Thank you for bringing this to our attention.

I can see that this was not raised as a bug ticket, so I've opened one on your behalf - you may Watch it to receive future updates related to it and click This Affects My Team to improve its visibility:

Cheers!

- Ben (Bitbucket Cloud Support)

Ross Ingle-Finch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 16, 2026

Thanks Ben!!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events